You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"Library 'pandas' is required to import csv, either install 'pandas' or install woqlDataframe requirements as follows: python -m pip install -U terminus-client-python[dataframe]"
@@ -455,19 +453,27 @@ def importcsv(
455
453
456
454
def_df_to_schema(class_name, df):
457
455
class_dict= {"@type": "Class", "@id": class_name}
458
-
np_to_buildin= {
459
-
v: getattr(builtins, k)
460
-
fork, vinnp.sctypeDict.items()
461
-
ifkinvars(builtins)
462
-
}
463
-
np_to_buildin[np.datetime64] =dt.datetime
464
456
forcol, dtypeindict(df.dtypes).items():
465
457
ifembeddedandcolinembedded:
466
458
converted_type=class_name
467
459
else:
468
-
converted_type=np_to_buildin[dtype.type]
469
-
ifconverted_typeisobject:
470
-
converted_type=str# pandas treats all string as objects
460
+
# Map pandas/numpy dtype to Python type
461
+
# Uses dtype.kind for compatibility with numpy 2.0+ and pandas 3.0+
0 commit comments