-
-
Notifications
You must be signed in to change notification settings - Fork 19.3k
Description
Research
-
I have searched the [pandas] tag on StackOverflow for similar questions.
-
I have asked my usage related question on StackOverflow.
Link to question on StackOverflow
https://stackoverflow.com/questions/43254699/pandas-to-dict-returns-none-mixed-with-nan
Question about pandas
pddata as below:
intc strc floatc
0 1 a 1
1 <NA> b 2
2 3 c 3
listdata = pddata.to_dict('records')then listdata with value pd.NA, which is not convenient to check in the code,
[{'intc': 1, 'strc': 'a', 'floatc': 1}, {'intc': , 'strc': 'b', 'floatc': 2}, {'intc': 3, 'strc': 'c', 'floatc': 3}]
usually need loop to change all the pd.NA to None.
Whether pddata.to_dict support this data transfer and
with better performence compare to python list loop method when process large of data,
for example, a list of 10million dict element.
If not support, maybe in the futher enhence to_dict method to support it?