Problem
The notebook working-with-csv.ipynb uses deprecated pandas arguments in pd.read_csv().
Examples found in the notebook:
squeeze=True
error_bad_lines=False
These parameters have been removed in pandas >= 2.0, which causes the following errors:
TypeError: read_csv() got an unexpected keyword argument 'squeeze'
TypeError: read_csv() got an unexpected keyword argument 'error_bad_lines'
Location
File: working-with-csv.ipynb
Suggested Fix
Update the deprecated arguments to their modern alternatives.
Replace:
pd.read_csv('aug_train.csv', usecols=['gender'], squeeze=True)
with:
pd.read_csv('aug_train.csv', usecols=['gender'])['gender']
and replace:
pd.read_csv('BX-Books.csv', sep=';', encoding='latin-1', error_bad_lines=False)
with:
pd.read_csv('BX-Books.csv', sep=';', encoding='latin-1', on_bad_lines='skip')
This will ensure compatibility with pandas 2.x.
I would be happy to submit a pull request implementing this fix.
Problem
The notebook
working-with-csv.ipynbuses deprecated pandas arguments inpd.read_csv().Examples found in the notebook:
squeeze=Trueerror_bad_lines=FalseThese parameters have been removed in pandas >= 2.0, which causes the following errors:
Location
File:
working-with-csv.ipynbSuggested Fix
Update the deprecated arguments to their modern alternatives.
Replace:
with:
and replace:
with:
This will ensure compatibility with pandas 2.x.
I would be happy to submit a pull request implementing this fix.