Before getting started, all required libraries and extensions are imported, the dataset is loaded, and a brief overview is obtained using .head() while .info() is used to assess data types and data shape.
View Code
# Import
import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns
# Load dataset
df = pd.read_csv('lightning_strikes_dataset.csv')
df.head()
df.info()
df.head()
| date | number_of_strikes | center_point_geom | |
|---|---|---|---|
| 0 | 2016-08-05 | 16 | POINT(-101.5 24.7) |
| 1 | 2016-08-05 | 16 | POINT(-85 34.3) |
| 2 | 2016-08-05 | 16 | POINT(-89 41.4) |
| 3 | 2016-08-05 | 16 | POINT(-89.8 30.7) |
| 4 | 2016-08-05 | 16 | POINT(-86.2 37.9) |
df.info()
<class 'pandas.core.frame.DataFrame'> RangeIndex: 10479003 entries, 0 to 10479002 Data columns (total 3 columns): # Column Dtype --- ------ ----- 0 date object 1 number_of_strikes int64 2 center_point_geom object dtypes: int64(1), object(2) memory usage: 239.8+ MB