Bottom Page

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
Quote

Top Page

Possibly Related Threads...
Thread Author Replies Views Last Post
  Pandas merge csv files karlito 2 278 Dec-16-2019, 10:59 AM
Last Post: karlito
  Pandas dataframe columns collapsed in Spyder when printing UniKlixX 2 390 Nov-04-2019, 07:00 AM
Last Post: UniKlixX
  Need Help With Filtering Data For Excel Files Using Pandas eddywinch82 9 870 Aug-06-2019, 03:44 PM
Last Post: eddywinch82
  [pandas] How to re-arrange DataFrame columns SriMekala 8 1,296 Jun-22-2019, 12:55 AM
Last Post: scidam
  Pandas - cumulative sum of two columns tobbs 12 2,090 May-25-2019, 08:37 PM
Last Post: tobbs
  Grab columns from multiple files, combine into one jon0852 0 499 Feb-12-2019, 02:53 AM
Last Post: jon0852
  Comparing 2 Files - Step 1, import and remove tags JP_ROMANO 7 985 Oct-04-2018, 12:43 PM
Last Post: JP_ROMANO
  subtruction of columns in pandas garikhgh0 3 989 May-14-2018, 10:31 AM
Last Post: volcano63

Forum Jump:


Users browsing this thread: 1 Guest(s)