(Jan-21-2020, 11:04 AM)perfringo Wrote: Totally unclear for me what data you have and how you want to manipulate it.
Want to add column to existing dataframe?
>>> df = pd.DataFrame({'nums': range(5)}) >>> df nums 0 0 1 1 2 2 3 3 4 4 >>> df['chars'] = list('abcde') >>> df nums chars 0 0 a 1 1 b 2 2 c 3 3 d 4 4 e >>> df['NaNs'] = np.nan >>> df nums chars NaNs 0 0 a NaN 1 1 b NaN 2 2 c NaN 3 3 d NaN 4 4 e NaN
Hi,
I have two Dataframes.
- test_df with 2 columns: date as index and night_cons (see image)
- pred_df with just a column "prediction" (see image)
I'm trying to merge both but when I do it, the final merged Dataframe gives NAN in the prediction column (see image please)
Hi,
I got it ... It was an index issue.
Thank you all.