Home > Enterprise >  Reference of cell value from one dataframe in another dataframe - getting NaN
Reference of cell value from one dataframe in another dataframe - getting NaN

Time:09-23

I am trying to map a particular cell of a bank statement into data frame. When I locate the value it is reading values perfectly, but when I include it into a dataframe it is coming 'NaN'. I would like to bring the balance to new dataframe. Thanks for your support.

Query and output for reference.

CodePudding user response:

Problem is ouput is one element DataFrame, need scalar. So select by scalars instead range:

info['balance'] = data2.iloc[11, 2]

For last row is possible use -1:

info['balance'] = data2.iloc[-1, 2]
  • Related