I have a pandas.DataFrame
containing pandas nullable integer data type and want to convert it to an equivalent datatable.Frame
object. However it seems it is not directly possible. What is the best way of doing the conversion without breaking stuff? I do not have the DataFrames available in text form, but they com e from a pickle
. MWE:
import numpy as np, pandas as pd, datatable as dt
vec = [0,1,2, np.nan]
df = pd.DataFrame(vec, dtype="Int32")
frame = dt.Frame(vec, stypes=["int32"]) # works fine
dt.Frame(df) # raises error
# TypeError: Cannot create a column from <class 'pandas.core.arrays.integer.IntegerArray'>