Skip to content

ak.to_dataframe() turns None into the string "nan" #3713

@TaiSakuma

Description

@TaiSakuma

Version of Awkward Array

2.8.10

Description and code to reproduce

ak.to_dataframe() turns None in the string column into the string "nan", which is indistinguishable from the actual string value "nan".

For example, starting from a list of two elements: [None, "nan"], create an Awkward Array and convert it to a DataFrame:

>>> import awkward as ak
>>> m = [None, "nan"]
>>> a = ak.Array(m)
>>> d = ak.to_dataframe(a)
>>> d.to_dict()
{'values': {0: 'nan', 1: 'nan'}}

The result is two values both string "nan".

This issue is related to #3694

Metadata

Metadata

Assignees

Labels

bug (unverified)The problem described would be a bug, but needs to be triaged

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions