First Push Attempt!!#2
Conversation
| #reading and sorting the dataset | ||
| ds_jobs = pd.read_csv("ds_salaries.csv") | ||
| ds_jobs.drop(columns=['Unnamed: 0'], inplace=True) | ||
| #ds_jobs.info() |
| ds_jobs.drop(columns=['Unnamed: 0'], inplace=True) | ||
| #ds_jobs.info() | ||
| #categorical colums with less than 20 categories | ||
| cat_feature1=[feature for feature in ds_jobs.columns if ds_jobs[feature].dtype=='O' and len(ds_jobs[feature].unique())<20] |
There was a problem hiding this comment.
love the inline for-loops!
| #ds_jobs.info() | ||
| #categorical colums with less than 20 categories | ||
| cat_feature1=[feature for feature in ds_jobs.columns if ds_jobs[feature].dtype=='O' and len(ds_jobs[feature].unique())<20] | ||
| print(cat_feature1) |
There was a problem hiding this comment.
are prints necessary for a streamlit app?
| ) | ||
|
|
||
| #plotting (with streamlit??) | ||
| if option == 'Categorical (<20 categories)': |
There was a problem hiding this comment.
this would be a great candidate for using a switch statement
There was a problem hiding this comment.
im using python 3.8 and on looking up how to implement them in python, it seems like I would need to simulate it the way I have done. I shouldnt need to update python in order to implement it right?
| fig.update_traces(root_color='lightgrey') | ||
| st.plotly_chart(fig) | ||
|
|
||
| st.header('Conclusions') |
There was a problem hiding this comment.
you could simplify these conclusions by using \n and less st.write statements. With that said it's a stylistic choice.
mbcutts
left a comment
There was a problem hiding this comment.
One note is all you really needed to push was the requirements, dataset, and streamlit file. The others are not necessary!
No description provided.