visualize-data-with-python
visualize-data-with-python copied to clipboard
A Jupyter notebook using some standard techniques for data science and data engineering to analyze data for the 2017 flooding in Houston, TX.
``` df['GuageHeight(feet)'] = df['GuageHeight(feet)'].convert_objects(convert_numeric=True) df['Discharge(cfs)'] = df['Discharge(cfs)'].convert_objects(convert_numeric=True) ``` yields: ``` /Users/scott/.pyenv/versions/3.6.5/lib/python3.6/site-packages/ipykernel_launcher.py:1: FutureWarning: convert_objects is deprecated. To re-infer data dtypes for object columns, use Series.infer_objects() For all other conversions use the...
```# setup line graph plt.plot(df['datetime'],df['Discharge(cfs)']) plt.title('Houston Flood discharge at Hunting Bayou stream gauge') plt.ylabel('Discharge(cfs)') plt.xlabel('datetime') ax = plt.gca() df.set_index('datetime') # Only label every 20th value ticks_to_use = df.index[::100] # label...