US Tropical Storm Data: 1851-1965, 1983-2019

Learn how to clean up hurricane data and present tropical data using different Python scripts.

Cleaning up the hurricane data

The rows representing years without events should, again, be removed:

df = df[(df.Date.str.contains("None")) == False]

This dataset’s Date column has characters pointing to five footnotes: $, *, #, %, and &. The footnotes contain essential information, but those characters will give us grief if we remove them. These commands will get that done, replacing all such strings in the Date column with nothing:

Next, we’ll reset the column headers first because it will be easier to work with short names. The column data types are going to need some work.

Get hands-on with 1400+ tech skills courses.