Generation

generate functionSat, 25 Feb 2023

Write code that finds all lines in the Pandas dataframe without the "%" sign and replace all their content with NaN

import pandas as pd df = pd.read_csv('https://raw.githubusercontent.com/justmarkham/pandas-videos/master/data/ufo.csv') df.head() df.shape df.info() df1 = df[df.City != '%'] df1.shape df1.head()

Questions about programming?Chat with your personal AI assistant