convert timedelta to str NOTE - only until arrow.js supports Duration type
(df: pd.DataFrame)
| 58 | |
| 59 | |
| 60 | def timedelta_to_str(df: pd.DataFrame): |
| 61 | """ |
| 62 | convert timedelta to str |
| 63 | NOTE - only until arrow.js supports Duration type |
| 64 | """ |
| 65 | df_td = df.select_dtypes("timedelta") |
| 66 | df[df_td.columns] = np.where(pd.isnull(df_td), pd.NA, df_td.astype("string")) |
| 67 | |
| 68 | |
| 69 | def parse_categories(data: pd.DataFrame): |
no outgoing calls