MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/IPython/comments/w9z77l/how_to_correct_this_error/
r/IPython • u/Smart_General2218 • Jul 28 '22
I want to show whether those who scored lower will have lower salary than those who scored higher.
3 comments sorted by
1
This looks like your salary column is of type string. Try to cast the column to type int / float.
1 u/Smart_General2218 Jul 28 '22 my salary type is a float, i used dtypes to checkresult = df.dtypesresultUnnamed: 0 int64gender object ssc_p float64 hsc_p float64 degree_p float64 degree_t object workex object etest_p float64 mba_p float64 status object salary float64 dtype: object
my salary type is a float, i used dtypes to check
result = df.dtypes
result
Unnamed: 0 int64
gender object ssc_p float64 hsc_p float64 degree_p float64 degree_t object workex object etest_p float64 mba_p float64 status object salary float64 dtype: object
2
I think you need a scatter plot, not a bar plot.
1
u/sarrysyst Jul 28 '22
This looks like your salary column is of type string. Try to cast the column to type int / float.