Informatics Practices

Are the following two statements same ? Why/Why not ?

(i) pd.read_csv('zoo.csv', sep = ',')

(ii) pd.read_csv('zoo.csv')

Python Pandas

3 Likes

Answer

Yes, the two statements are same. The reason is that when we don't explicitly specify the sep parameter in pd.read_csv(), pandas assumes the default separator to be a comma (,). So, both statements are telling pandas to read the CSV file "zoo.csv" with comma-separated values.

Answered By

1 Like


Related Questions