Python Forum
comparing two columns two different files in pandas
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
comparing two columns two different files in pandas
#1
The thred subject seems to oversimplify my query. I have a data set something like below
h t hu
1 3 5
2 4 5
3 10 3
4 2 5
5 10 6
7 9 3
8 10 3
9 11 2
10 11 1
1 3 5
2 4 5
3 10 3
4 2 5
5 10 6
6 1 2
7 9 3
8 10 3
9 11 2

and another file
1
2
3
4
5
6
7
8
9
10

the first colum in first file represent an index, say height and some values for each height(h), say temperature(t) and humidity(hu)
the observation is repeated at some definite interval like after 10 observations, height 1 is started again. The column in the second file represents all the possible heights where measurements can be made

the first file represents some actual observations with some missing values in this case height 6 for first time interval and for second time interval height 10
I want to compare the height at each time interval with the second file containing all the possible heights and find out which heights are missing. Also fill the missing height and corresponding values as blank or NaN values. My aim is to have all time blocks with equal number of rows

Can somebody provide any clues

thanks and regards
nuncio
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Pandas dataframe comparing anto5 0 1,243 Jan-30-2022, 10:21 AM
Last Post: anto5
  Import multiple CSV files into pandas Krayna 0 1,694 May-20-2021, 04:56 PM
Last Post: Krayna
  iretate over columns in df and calculate euclidean distance with one column in pandas Pit292 0 3,268 May-09-2021, 06:46 PM
Last Post: Pit292
  pandas.to_datetime: Combine data from 2 columns ju21878436312 1 2,420 Feb-20-2021, 08:25 PM
Last Post: perfringo
  Remove extra count columns created by pandas groupby spyf8 1 2,686 Feb-10-2021, 09:19 AM
Last Post: Naheed
  Python - Pandas writing blank files to file tdunphy 0 1,972 Jan-14-2021, 12:11 AM
Last Post: tdunphy
  Comparing results within a list and appending to pandas dataframe Aryagm 1 2,320 Dec-17-2020, 01:08 PM
Last Post: palladium
  Pandas: summing columns conditional on the column labels ddd2332 0 2,077 Sep-10-2020, 05:58 PM
Last Post: ddd2332
  Creating many csv files from Pandas EMA 0 1,610 Jul-26-2020, 06:39 PM
Last Post: EMA
  Difference of two columns in Pandas dataframe zinho 2 3,314 Jun-17-2020, 03:36 PM
Last Post: zinho

Forum Jump:

User Panel Messages

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