Devarshi Goswami
Devarshi Goswami

Reputation: 1225

How do I correctly plot two columns of a dataframe when the size of data is huge?

I have a dataframe of the format:

df = pd.DataFrame({
        'TCTN':list('101','102','103',....,'STDEV')
         '0':[855days,626days,....,5911days],
         '1':[946days,485days,....,6040days],
         '2':[1242days,1985days,....,5974days],
         '3':[345days,1864days,....,6062days],
})

of 4997 rows × 229 columns for which i tried to plot columns TNTC vs STDEV using:

df3.plot(x='STDEV' ,y='TNTC',figsize=(20,5),style='o')

which gives me a plot like this: matplotlib plot

but what i actually needed is the TNTC values on the Y axis. Is that not possible since there are 4997 rows? do i change the style of the plot to better fit the data?

Upvotes: 1

Views: 221

Answers (1)

ProteinGuy
ProteinGuy

Reputation: 1942

Use matplotlib instead of pandas to do the plotting:

import matplotlib.pyplot as plt

plt.scatter(df['STDEV'].values, df['TNTC].values)

Upvotes: 1

Related Questions