Trouble with NaNs: set_index().reset_index() corrupts data
问题 I read that NaNs are problematic, but the following causes an actual corruption of my data, rather than an error. Is this a bug? Have I missed something basic in the documentation? I would like the second command to give an error or to give the same response as the first command: ipdb> df year PRuid QC data 18 2007 nonQC 0 8.014261 19 2008 nonQC 0 7.859152 20 2010 nonQC 0 7.468260 21 1985 10 NaN 0.861403 22 1985 11 NaN 0.878531 23 1985 12 NaN 0.842704 24 1985 13 NaN 0.785877 25 1985 24 1 0