I have the below pandas code, I want to plot() to display the image, but PyCharm do not shows up.
import numpy as np
import pandas as pd
date1 = pd.date_range('20190114', periods=6)
df = pd.DataFrame(np.random.randn(6, 4)) # shape(6, 4)
print(df[0])
df[0].plot()
In my Pycharm why the df.plot() do not show up?
CodePudding user response:
I'm not quite sure if this is what you want but there you go:
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
date1 = pd.date_range('20190114', periods=6)
df = pd.DataFrame(np.random.randn(6, 4)) # shape(6, 4)
print(df)
plt.plot(df)
plt.show()
CodePudding user response:
Try:
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
date1 = pd.date_range('20190114', periods=6)
df = pd.DataFrame(np.random.randn(6, 4)) # shape(6, 4)
print(df[0])
df[0].plot()
plt.show()