Skip to content

Commit 3d190aa

Browse files
committed
Replace deprecated method iteritems() for pandas
With new pandas version 2.0.0, the attribute was removed, retrieving an error. Reference: https://pandas.pydata.org/docs/whatsnew/v2.0.0.html#removal-of-prior-version-deprecations-changes
1 parent fcd5b9c commit 3d190aa

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: csvs_to_sqlite/utils.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,7 @@ def get_create_table_sql(
284284
# http://pandas.pydata.org/pandas-docs/stable/gotchas.html#support-for-integer-na
285285
sql_type_overrides = sql_type_overrides or {}
286286
if isinstance(df, pd.DataFrame):
287-
columns_and_types = df.dtypes.iteritems()
287+
columns_and_types = df.dtypes.items()
288288
elif isinstance(df, pd.Series):
289289
columns_and_types = [(df.name, df.dtype)]
290290
for column, dtype in columns_and_types:

0 commit comments

Comments
 (0)