Reading / Writing a CSV
This quiz covers how to read/write a .csv file/dataset in Pandas.
We'll cover the following...
We'll cover the following...
Reading/writing .csv files
1.
Assuming there are bad lines (e.g., too many commas in a line) in a csv
file, how can you skip them from being read in your DataFrame
, without throwing an error?
A.
df = pd.read_csv('f.csv', warn_bad_lines=True)
B.
df = pd.read_csv('f.csv', error_bad_lines=True)
C.
df = pd.read_csv('f.csv')
df = df.dropna()
1 / 3