0

pandas seems to simply drop columns with NaN in group by. I want to get "NaN",0, or some other value if there is a NaN in the grouping. I have numbers of columns that I am summing. What is the best way to do this?

  • `.fillna(...)` ? – Michael Jan 08 '21 at 20:52
  • 1
    Does this answer your question? [pandas GroupBy columns with NaN (missing) values](https://stackoverflow.com/questions/18429491/pandas-groupby-columns-with-nan-missing-values) – PieCot Jan 08 '21 at 20:55

0 Answers0