Pandas.jl icon indicating copy to clipboard operation
Pandas.jl copied to clipboard

Fails to convert to python DataFrames with mixed types

Open ahjulstad opened this issue 1 year ago • 0 comments

When trying to convert into a python dataframe a julia dataframe with mixed datatypes, such as

using DataFrames
import Pandas
DataFrame(:v=>["Test", 42]) |> Pandas.DataFrame

I get error message ERROR: ArgumentError: Can't create a Pandas.DataFrame from a source that has missing data.

Apart from the fact that the error message is misleading, I think this should work as the following is OK:

pd = pyimport_conda("pandas", "pandas")
pd.DataFrame(Dict(:v=>["Test", 42]))

ahjulstad avatar Aug 09 '23 09:08 ahjulstad