Reputation: 3058
I want to print the dataframe and plots in the order as in the code in my jupyter notebook:
Currently, they are printed as:
from IPython.display import display
import matplotlib.pyplot as plt
df = pd.DataFrame({'x': range(5), 'y': range(5)})
for i in range(2):
display(df)
display(df.plot())
Upvotes: 6
Views: 1495
Reputation: 150785
Force plt.show
after you plot:
for i in range(2):
display(df)
df.plot()
plt.show()
Upvotes: 9