NaN values when new column added to pandas DataFrame
Because the indexes are not exactly equal, NaNs will result. Either one or both of the indexes must be changed to match. Example: mydata = mydata.set_index(DWDATA.index) The above will change the index of the ‘mydata’ DataFrame to match the index of the ‘DWDATA’ DataFrame. Since the number of rows are exactly equal for the two … Read more