Skip to content

Commit

Permalink
pandas deprecation change
Browse files Browse the repository at this point in the history
  • Loading branch information
martynaut committed Jun 4, 2024
1 parent 84b1950 commit 44abd31
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sroka/api/s3_connection/s3_connection_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def _download_data(key_prefix, s3, bucket_name, prefix, sep, skip_empty_files=Tr
print('File not found on s3')
return pd.DataFrame([])
try:
df_list.append(pd.read_csv(data, error_bad_lines=False, warn_bad_lines=False, sep=sep,
df_list.append(pd.read_csv(data, on_bad_lines='skip', sep=sep,
header=header_setting))
except UnicodeDecodeError:
df_list.append(pq.read_pandas(data).to_pandas())
Expand All @@ -47,7 +47,7 @@ def _download_data(key_prefix, s3, bucket_name, prefix, sep, skip_empty_files=Tr
if 'SUCCESS' not in file.key:
tmp = StringIO(str(file.get()['Body'].read(), 'utf-8'))
try:
data = pd.read_csv(tmp, error_bad_lines=False, warn_bad_lines=False, sep=sep,
data = pd.read_csv(tmp, on_bad_lines='skip', sep=sep,
header=header_setting)
df_list.append(data)
except EmptyDataError:
Expand Down

0 comments on commit 44abd31

Please sign in to comment.