Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR TYPESCRIPT

create plots with multiple dataframes python

import pandas as pd
import numpy as np
import matplotlib.pyplot as plt

scenarios = ['scen-1', 'scen-2']

fig, ax = plt.subplots()

for index, item in enumerate(scenarios):
    df = pd.DataFrame({'A' : np.random.randn(4)})
    print df
    df.plot(ax=ax)

plt.ylabel('y-label')
plt.xlabel('x-label')
plt.title('Title')
plt.show()
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #create #plots #multiple #dataframes #python
ADD COMMENT
Topic
Name
7+5 =