Chronus
Chronus

Reputation: 385

pandas graph not appearing on screen

Can someone help me find out why is this code not displaying any type of graph in my screen?

import pandas as pd
data = [1.5]*7 + [2.5]*2 + [3.5]*8 + [4.5]*3 + [5.5]*1 + [6.5]*8
df = pd.DataFrame(data)
df.plot(kind='density')

This example was taken from here. The code is being run via terminal on Ubuntu

Upvotes: 0

Views: 342

Answers (1)

Nathan
Nathan

Reputation: 10306

You may have to do this too, though I don't have the proper OS to check for you:

import matplotlib.pyplot as plt
# your other code here
plt.show() # at the end

Upvotes: 1

Related Questions