Home >
other > That data analysis and visualization problem why write line 18 has been an error
That data analysis and visualization problem why write line 18 has been an error
Read data from http://www.digitalanalytics.id.au/static/files/artists-spotify-clean.csv,
Describe the variables from the statistics and visualization popularity and followers,
From the statistics and visualization analysis of the relationship between popularity and followers,
The original problem is
Read the data from http://www.digitalanalytics.id.au/static/files/artists-spotify-clean.csv
The Describe the variables popularity and followers, both statistically and visually. Summarize your findings/interpretation of the result in # a comment.
Analyse the relationship between popularity and followers, both statistically and visually. Summarize your findings/interpretation of the result in # a comment.
As such, now 18 error
The import pandas as pd
The import researchpy as rp
The import matplotlib. Pyplot as PLT
Df=pd read_csv (' http://www.digitalanalytics.id.au/static/files/artists-spotify-clean.csv ', sep='; ')
Print (df) [r]. 'popularity' the describe ())
PLT. Hist (df [' popularity '], bins=100)
='plain' PLT. Ticklabel_format (style)
='vertical' PLT. Xticks (rotation)
PLT. Tight_layout ()
PLT. Savefig (' histo. PDF)
PLT. CLF ()
Print (df) [r]. 'followers' the describe ())
PLT. Hist (df [' followers'], bins=100)
='plain' PLT. Ticklabel_format (style)
='vertical' PLT. Xticks (rotation)
PLT. Tight_layout ()
PLT. Savefig (' histo. PDF)
PLT. CLF ()
Print (rp. The correlation. Corr_pair (df [[' popularity ', 'followers']]))
PLT. Scatter (df [' popularity '], df [' followers'])
PLT. Xlabel (' popularity ')
PLT. Ylabel (' Number of followers')
='plain' PLT. Ticklabel_format (style)
='vertical' PLT. Xticks (rotation)
PLT. Tight_layout ()
PLT. Savefig (' scatterplot. PDF)
PLT. CLF ()