-
Notifications
You must be signed in to change notification settings - Fork 6
First Push Attempt!! #2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
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() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unneeded
| 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
are prints necessary for a streamlit app?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nope! :)
| ) | ||
|
|
||
| #plotting (with streamlit??) | ||
| if option == 'Categorical (<20 categories)': |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this would be a great candidate for using a switch statement
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One note is all you really needed to push was the requirements, dataset, and streamlit file. The others are not necessary!
No description provided.