Python – Replace Null or Blank values with NaN
I’m trying to study for my Programming course and I need some help to understand this question.
You are working as an Analytics Engineer for one of the book retail website. You need to identify best selling books based on the data. You have received the data in Excel file. You need to sort the result based on the best-selling book. You need to display following information on the website.
- Brand
- Name
- List_Price
- Model
Use the attached file- paytm_com-ecommerce_sample.csv file.
A brand column in the CSV file has various Null or Blank rows. These need to be replaced.
Directions:
- Use Pandas to read the csv file
- Analyze the Brand data column
- Replace Null or Blank value with NaN.
- Filter out NaN values from the current file and write it into another file.
- Your python script should generate two files.
- File without any NaN value in Brand column
- File with NaN value in Brand column
Submission:
- Python Script
- Two files – one file without any NaN value in Brand column; One file with NaN value in Brand column
- Output Screenshot
"96% of our customers have reported a 90% and above score. You might want to place an order with us."
