0

I have six dataframes: actual minimum/maximum temperatures, record minimum/maximum temperatures, and mean minimum/maximum temperatures. The actual temperatures dataframes look something like this and span the years 1981-2022. The 'DATE' column is the day of the year.

      DATE  DATA_VALUE
0      152        11.1
1      153        13.9
2      154        12.8
...
9208   273         6.7
9209   274         6.1

The record temperature and mean temperature dataframes look like this:

     DATE  DATA_VALUE
0       1       -26.0
1       2       -26.0
2       3       -23.2
...
362   363       -16.7
363   364       -17.7

I want to combine all six dataframes into one, where it looks like this:

       DATE  actual_tmin  record_tmin   mean_tmin   actual_tmax   record_tmax   mean_tmax
0       1       1           -26.0         13           22            33           24
1       2       3           -26.0         19           24            29           26
2       3       2           -23.2         25           21            26           27
3       4       2.1         -16.7         17           20            27           26
4       4       -3          -17.7         18           21            31           28

I tried using concat, but the result had a DATE column for every previous separate dataframe, and I want the column title to be the names of the types of temperatures instead of DATA_VALUE.

wjandrea
  • 28,235
  • 9
  • 60
  • 81
kjmw
  • 13
  • 4

0 Answers0