Ad

Why Panda.hist() Not Showing Graph?

- 1 answer

I load data from a link given into variable dataframe and when I use dataframe.hist() then the it shows some weird cpu states.

import pandas as pd

dataframe=pd.read_csv("https://download.mlcc.google.com/mledu-datasets/california_housing_train.csv")

dataframe.hist('longitude')

I expect some graph to be shown but instead it shows

C:\ProgramData\Anaconda3\python.exe D:/TensorFlow/untitled/New.py
OMP: Info #212: KMP_AFFINITY: decoding x2APIC ids.
OMP: Info #210: KMP_AFFINITY: Affinity capable, using global cpuid leaf 11 info
OMP: Info #154: KMP_AFFINITY: Initial OS proc set respected: 0-3
OMP: Info #156: KMP_AFFINITY: 4 available OS procs
OMP: Info #157: KMP_AFFINITY: Uniform topology
OMP: Info #179: KMP_AFFINITY: 1 packages x 4 cores/pkg x 1 threads/core (4 total cores)
OMP: Info #214: KMP_AFFINITY: OS proc to physical thread map:
OMP: Info #171: KMP_AFFINITY: OS proc 0 maps to package 0 core 0 
OMP: Info #171: KMP_AFFINITY: OS proc 1 maps to package 0 core 1 
OMP: Info #171: KMP_AFFINITY: OS proc 2 maps to package 0 core 2 
OMP: Info #171: KMP_AFFINITY: OS proc 3 maps to package 0 core 3 
OMP: Info #250: KMP_AFFINITY: pid 7648 tid 4536 thread 0 bound to OS proc set 0
Ad

Answer

import matplotlib.pyplot as plt
import pandas as pd

dataframe=pd.read_csv("https://download.mlcc.google.com/mledu-datasets/california_housing_train.csv")

a = dataframe['longitude']

plt.hist(a)
plt.show()
Ad
source: stackoverflow.com
Ad