Python Forum
Poll: help mapping time series data
You do not have permission to vote in this poll.
POLL
0%
0 0%
POLL
0%
0 0%
Total 0 vote(s) 0%
* You voted for this item. [Show Results]

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Time series
#1
Hello, I'm a beginnr and I need help in the Map steps to dates
please help it's urgent!!        


train = pd.read_csv('Train.csv')
print(train.shape)
train.head()
test = pd.read_csv('Test.csv')
print(test.shape)
test.head()
ss = pd.read_csv('SampleSubmission.csv')
print(ss.shape)
ss.head()
def process(train,test,ss) :
  
  target_mapper = dict(zip(ss.drop('ID',1).columns.tolist(),
                          [i for i in range(len(ss.drop('ID',1).columns.tolist()))]))  # Used to Encode Train Target 
  train['Target'] = train['Target'].map(target_mapper)
  
  Inversetarget_mapper = dict(zip([i for i in range(len(ss.drop('ID',1).columns.tolist()))],
                                  ss.drop('ID',1).columns.tolist())) # Used to Create submission file 

  in_cols = train.filter(like='timestep1_').columns.tolist() # features used in Training, we will use only time step 1 in this tutorial

  return target_mapper , Inversetarget_mapper , in_cols , train , test , ss
Larz60+ write Apr-23-2022, 01:29 AM:
Please post all code, output and errors (it it's entirety) between their respective tags. Refer to BBCode help topic on how to post. Use the "Preview Post" button to make sure the code is presented as you expect before hitting the "Post Reply/Thread" button.
Fixed for you this time. Please use BBCode tags on future posts.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Date Time Series Help...Please spra8560 2 381 Feb-01-2024, 01:38 PM
Last Post: spra8560
  Print names in x-axis of a time-series values hobbyist 4 1,245 Apr-22-2023, 09:29 PM
Last Post: deanhystad
  How to read rainfall time series and insert missing data points MadsM 4 2,192 Jan-06-2022, 10:39 AM
Last Post: amdi40
  Plotting A Time Series With Shaded Recession Bars adamszymanski 1 3,169 Jan-24-2021, 09:08 PM
Last Post: nealc
  Getting the hourly average of a time series dataset Raskou07 10 12,594 Dec-15-2020, 12:51 PM
Last Post: palladium
  Tableau Time Series Prediction using Python Integration tobimarsh43 0 1,924 Jul-24-2020, 10:38 AM
Last Post: tobimarsh43
  Bode plot from time series experiment data discus 4 7,370 Jun-20-2020, 07:46 AM
Last Post: discus
  Convert quarterly time series to monthly time series donnertrud 1 5,191 May-22-2020, 10:16 AM
Last Post: pyzyx3qwerty
  Time series manipulation SinPy 0 1,427 Apr-01-2020, 12:48 PM
Last Post: SinPy
  Multiply Two Time Series: Not Working brandonfoo 0 2,008 Feb-27-2019, 05:15 AM
Last Post: brandonfoo

Forum Jump:

User Panel Messages

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