0

I have an array of different weather readings in the same column containing temperature, wind, humidity, ...

I need to be able to take information from within the column and create columns of the cleaned data in their separate associated columns

Tried a few regex things, excel solves the problem fast but I need a python/pandas solution

There are variable amounts of information provided

for index, row in Weather.iterrows():
   Weather['Temp']=row['Weather'][:2])

24 degrees relative humidity 62%, no wind, wind chill 0

24 | 62 | 0 | 0

61 degrees, wind 5 mph

61| 0 | 5 | 0

William Bernard
  • 359
  • 4
  • 15

1 Answers1

0

Do:

Weather['Temp']=Weather['Weather'].str[:2]
U13-Forward
  • 69,221
  • 14
  • 89
  • 114