admin管理员组

文章数量:1122846

I'm using pandas just to read an excel file and then give it back as list of lists.

data = (df.where(pd.notna(df), None)).values.tolist()

Now I wanted to apply polars with fastexcel since it is really much faster for larger files.

data = list(map(list, df.fill_null(value=None).rows())) results in an error:

`... ValueError: must specify either a fill 'value' or 'strategy'

What would be the most compact solution to replace the pandas command with keeping value types according to excel file?

本文标签: nullpython polars fillnull with None doesn39t workStack Overflow