Aan de slagGa gratis aan de slag

Combine and resample

You'll now combine environmental data with a traffic dataset. The traffic consists of 2 columns, light_veh and heavy_veh.

  • heavy_veh represents the number of heavy vehicles like lorries or busses per hour on a road of a small city.
  • light_veh contains the number of light vehicles, like automobiles or motorbikes per hour on that road.

The environmental dataset consists of

  • temperature in degree Celsius.
  • humidity in percent.
  • sunshine duration in seconds.

Since the traffic-dataset is in 1 hour buckets, but the environmental data is in 10 minute buckets, you'll need a way to resolve this.

The data is available as environ and traffic.

Deze oefening maakt deel uit van de cursus

Analyzing IoT Data in Python

Cursus bekijken

Praktische interactieve oefening

Probeer deze oefening eens door deze voorbeeldcode in te vullen.

# Combine the DataFrames
environ_traffic = pd.____([____], axis=____)

# Print first 5 rows
____
Code bewerken en uitvoeren