0

Pandas dataframes with Pint dtypes do not appear to be saving to Parquet or Hdf5 format. Is there no support for this, or am I doing this wrong.

import pandas as pd
import numpy as np
import pint,pint_pandas

eq = pd.DataFrame({'sname':pd.Series(['a','b','c'],dtype = 'string'),'val':pd.Series([10.0,12.0,14.0],dtype = 'pint[W/square feet]')})

eq.to_feather('test.feather')

Get similar error as below while trying to save to all other formats:

ArrowTypeError: ('Did not pass numpy.dtype object', 'Conversion failed for column val with type pint[watt / foot ** 2]')
kbk78
  • 139
  • 4

0 Answers0