Updated specific locations to be searchable, take a look at Las Vegas as an example.

This post has been de-listed

It is no longer included in search results and normal feeds (front page, hot posts, subreddit posts, etc). It remains visible only via the author's post history.

1
Python Homework Help
Post Body

Hello everyone,

I'm a bit stuck on a homework assignment. The goal of the assignment is to merge multiple CSV files into one data frame, then clean the data frame. I've merged the CSV files together and verified the number of rows that should be in the frame. I'm now stuck trying to replace two different typed-in error strings within the data frame.

I hope this explains it a bit more: I have two columns, income and rate. The income column has scattered errors reading "Syntax error in formula" followed by some other text. The rate column has "error: Please use field" followed by some other text. I assume the goal of this exercise, for the sake of the assignment, would be to replace the error strings with average values from the rest of the data frame, some 6,000 entries.

I've tried using some df.replace() commands, but without any luck. Is there a way to replace non-numerical entries within the two columns (income and rate) without affecting the rest of the data frame?

Thanks in advance for your help/input!

- Dalebert

Author
Account Strength
80%
Account Age
5 years
Verified Email
Yes
Verified Flair
No
Total Karma
417
Link Karma
17
Comment Karma
400
Profile updated: 4 days ago
Posts updated: 3 weeks ago

Subreddit

Post Details

We try to extract some basic information from the post title. This is not always successful or accurate, please use your best judgement and compare these values to the post title and body for confirmation.
Posted
3 years ago