From what I understand is that the default dataframe int datatype does not allow for NA, so it’ll convert these columns to float. The standard way to handle this is to use the fillna() method, but you must put in a value which people typically use 0. 0 is not NA, it’s a value, so I don’t want this.
So I found this StackOverflow post:
which indicated that if I convert to Int64 instead of int64 I can use a pandas datatype that accepts NA
for col_name, item in df.iteritems(): df[col_name] = df[col_name].astype('Int64')
Running this gives me an error.
I’m running this locally to get this error, I haven’t yet pushed this to the GitHub, but I can if the community wants to recreate the error with my app.