Python Forum
How to combine timeseries data under one column?
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to combine timeseries data under one column?
#1
I have two columns A and B that consists of the same timestamps with different data, it is like 2 sensors collecting data at the same time. These two columns are in one dataframe. But now I want to have these 2 columns merged under one bigger column say C. How can I do this correctly? I have tried many ways but no luck in getting the desired output. What I have tried so far is using the below code but it is actually creating a new data frame which is not what I need.

data = pd.DataFrame({'a': df.loc[9]['b'],'b':df.loc[9]['c']}

i used .loc[9] just to see how it will be merged for one observation.

any advice will be much appreciated.
Reply


Messages In This Thread
How to combine timeseries data under one column? - by python_newbie09 - Oct-18-2018, 04:28 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Returning Column and Row Data From Spreadsheet knight2000 0 474 Oct-22-2023, 07:07 AM
Last Post: knight2000
  Database that can compress a column, or all data, automatically? Calab 3 1,232 May-22-2023, 03:25 AM
Last Post: Calab
  Code for pullng all data in a column EmBeck87 5 1,157 Apr-03-2023, 03:43 PM
Last Post: deanhystad
  How to combine multiple column values into 1? cubangt 15 2,921 Aug-11-2022, 08:25 PM
Last Post: cubangt
  split txt file data on the first column value shantanu97 2 2,466 Dec-29-2021, 05:03 PM
Last Post: DeaD_EyE
  Retrieving a column from a data set using a function Bayle 6 2,389 Oct-06-2021, 08:52 PM
Last Post: Bayle
  How does one combine 2 data sets ? detlefschmitt 2 1,717 Sep-03-2021, 03:38 AM
Last Post: detlefschmitt
  Python Pandas: How do I extract all the >1000 data from a certain column? JaneTan 0 1,580 Jul-17-2021, 09:09 AM
Last Post: JaneTan
  Pandas DataFrame combine rows by column value, where Date Rows are NULL rhat398 0 2,139 May-04-2021, 10:51 PM
Last Post: rhat398
  How to filter out Column data From Multiple rows data? firaki12345 10 5,175 Feb-06-2021, 04:54 AM
Last Post: buran

Forum Jump:

User Panel Messages

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