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
#2
It would be easier to understand, if you could also show some part of your current dataframe, and then what would be your desired output out of that.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Returning Column and Row Data From Spreadsheet knight2000 0 413 Oct-22-2023, 07:07 AM
Last Post: knight2000
  Database that can compress a column, or all data, automatically? Calab 3 1,120 May-22-2023, 03:25 AM
Last Post: Calab
  Code for pullng all data in a column EmBeck87 5 1,050 Apr-03-2023, 03:43 PM
Last Post: deanhystad
  How to combine multiple column values into 1? cubangt 15 2,631 Aug-11-2022, 08:25 PM
Last Post: cubangt
  split txt file data on the first column value shantanu97 2 2,378 Dec-29-2021, 05:03 PM
Last Post: DeaD_EyE
  Retrieving a column from a data set using a function Bayle 6 2,290 Oct-06-2021, 08:52 PM
Last Post: Bayle
  How does one combine 2 data sets ? detlefschmitt 2 1,657 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,529 Jul-17-2021, 09:09 AM
Last Post: JaneTan
  Pandas DataFrame combine rows by column value, where Date Rows are NULL rhat398 0 2,082 May-04-2021, 10:51 PM
Last Post: rhat398
  How to filter out Column data From Multiple rows data? firaki12345 10 5,012 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