Python Forum
Help on Time Series problem
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help on Time Series problem
#1
I need guidance on the time series problem below. I tried to do on my own as mentioned below but it is not working. I want to know how can I update the line ‘close_AA=’

import pandas as pd
dataFrame = pd.read_csv('dow_jones_index.data',parse_dates=["date"], index_col="date")
dataFrame.head()
closeTS = dataFrame[(dataFrame.stock == 'AA')].close.str.replace('$',' ').astype(float)

#Using the data filtered in the above step list all the closing price from jan to march assign the resulting series to variable 'close_AA'

###Start code here
### tried with ps.series(closeTS) but it is not working
close_AA = 
print (close_AA)###End code(approx 1 line)
close_AA.to_csv("output.txt")
Reply
#2
I need help on the below upsample/downsample time series problem and I'm not certain how to complete it. I have a given a try but no luck.

import pandas as pd
dataFrame = pd.read_csv('dow_jones_index.data',parse_dates=["date"], index_col="date")
dataFrame.head()
closeTS = dataFrame[(dataFrame.stock == 'AA')].close.str.replace('$',' ').astype(float)
###Upsample the data filtered in the above step month wise and fill the max value of closing price for each month
###return the samples of down sampled data to variable 'upsample'

###Start code here
### tried upsample=closeTS but it is not working 
upsample = 
print(upsample)
###End code(approx 1 line)
upsample.to_csv("output.txt")
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Fit straight line to pandas time series data with semilog plot schniefen 2 1,542 Mar-10-2023, 01:08 PM
Last Post: jefsummers
  Plot time series data schniefen 3 1,333 Mar-04-2023, 04:22 PM
Last Post: noisefloor
  Time limit exceed problem chonchon430 10 3,608 Oct-06-2020, 11:39 PM
Last Post: deanhystad
  Visualisation of gaps in time series data ulrich48155 11 19,338 Jul-04-2017, 11:47 PM
Last Post: zivoni
  10fold cross-validation on time series ulrich48155 5 9,215 May-08-2017, 04:36 PM
Last Post: ulrich48155

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020