Charting a pandas DataFrame with Matplotlib
The pandas
library provides plotting capabilities for Series and DataFrame objects using Matplotlib.
Let's create a pandas
DataFrame with the Cont
value containing continuous values that mimic prices and the Delta1
and Delta2
values to mimic price changes. The Cat
value contains categorical data from five possibilities:
import pandas as pd df = pd.DataFrame(index=range(1000), columns=['Cont value', 'Delta1 value', 'Delta2 value', 'Cat value']) df['Cont value'] = np.random.randn(1000).cumsum() df['Delta1 value'] = np.random.randn(1000) df['Delta2 value'] = np.random.randn(1000) df['Cat value...