羽のファイルにパンダのデータフレームを書き込む際にエラー

SomeBruh:

実行中:

df.to_feather(file_path)

次のエラーが発生しました:

Traceback (most recent call last):
  File "X:\FAKE\script.py", line 37, in df_to_feather
    df.to_feather(file_path)
  File "X:\FAKE\venv\lib\site-packages\pandas\util\_decorators.py", line 214, in wrapper
    return func(*args, **kwargs)
  File "X:\FAKE\venv\lib\site-packages\pandas\core\frame.py", line 1994, in to_feather
    to_feather(self, path)
  File "X:\FAKE\venv\lib\site-packages\pandas\io\feather_format.py", line 64, in to_feather
    feather.write_feather(df, path)
  File "X:\FAKE\venv\lib\site-packages\pyarrow\feather.py", line 183, in write_feather
    writer.write(df)
  File "X:\FAKE\venv\lib\site-packages\pyarrow\feather.py", line 98, in write
    self.writer.write_array(name, col.chunk(0))
  File "pyarrow\feather.pxi", line 67, in pyarrow.lib.FeatherWriter.write_array
  File "pyarrow\error.pxi", line 105, in pyarrow.lib.check_status
pyarrow.lib.ArrowNotImplementedError: extension<pandas.period>

これを解決する方法任意のアイデアをいただければ幸いです。:)

ジェームズ:

最後の行:

pyarrow.lib.ArrowNotImplementedError: extension<pandas.period>

データの種類があることを通知されたpandas.Period現在の羽の形式は実装されていません。これは、列または索引のいずれかです。あなたは使用期間の開始/終了に変換試すことができます.asfreq()方法を、またはあなたが使用してタイムスタンプに変換することができます.to_timestamp()方法を。

おすすめ

転載: http://43.154.161.224:23101/article/api/json?id=33936&siteId=1