I have a data frame df which looks like:
date day
0 2016-01-29 value 14.108988 dtype: float64
1 2016-02-01 value 20.689517 dtype: float64
2 2016-02-02 value 52.076471 dtype: float64
3 2016-02-03 value -1.750325 dtype: float64
4 2016-02-04 value -158.166786 dtype: float64
My question is how do I remove the 'value' and 'dtype: float64' from each row of the dataframe so I am left with :
date day
0 2016-01-29 14.108988
1 2016-02-01 20.689517
2 2016-02-02 52.076471
3 2016-02-03 -1.750325
4 2016-02-04 -158.166786
The dataframe df is filled in the following way below is the head of another dataframe called timeseriesData :
MTAA \
date
2015-12-25 NaN
2015-12-26 NaN
2015-12-28 41.15
2015-12-29 42.27
2015-12-30 42.09
I iterate through the index to get the date used in the date column of the dataframe using:
for index, row in timeseriesData.iterrows():
day = index
the day value is created from the following perf dataframe:
perf value
id
0 -0.000000
1 -0.000000
2 -0.000000
3 -0.000000
4 -0.000000
5 32.048692
6 -0.000000
7 -0.000000
9 -0.000000
10 -73.147585
using:
perf.sum()
I've not seen this before and have looked for a solution but not found one.
Why do I have 'value' and the datatype and how can I remove them?