Question: PYTHON Pandas DataFrame I've just cleaned a database, filtered potentially redundant information. Now, I am trying to store the modifed data in a Pandas DataFrame

PYTHON Pandas DataFrame

I've just cleaned a database, filtered potentially redundant information. Now, I am trying to store the modifed data in a Pandas DataFrame called dfBabies. This is all on jupyter notebook. If you need more clarity, please ask.

so far, this is what i have.

df = pd.read_csv("https://www.stat.berkeley.edu/~statlabs/data/babies.data", delim_whitespace=True) df.head(10) # simply calling and reading the database

df[(df.smoke != 9) & (df.weight != 999) & (df.height != 99) & (df.parity != 9) & (df.gestation != 999) & (df.bwt != 999)] #Modification

Thank yoU!

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!