anyone got an easy way to get pandas dataframes (w...
# ask-community
t
anyone got an easy way to get pandas dataframes (with nulls/dates) into artifacts?
k
a table artifact accepts a list of dictionaries shaped like
{"column": value}
so you'll want
<http://my_dataframe.to|my_dataframe.to>_dict(orient="records")
t
yaaa im doing that but running into json serialization issues on dates and NaNs. Not sure if i can send in my own encoder which is usually how i get around these json encoding issues with pandas/numpy
k
hmm yeah not sure about that either. I usually go and replace the values in the dataframe that aren't playing nice before trying to write it somewhere
j
If you're "done" with the dataframe, cast the column to a string?
t
hahah i love that janet i think youre right on the money