Skip to content

Conversation

@jaderall
Copy link

No description provided.

#reading and sorting the dataset
ds_jobs = pd.read_csv("ds_salaries.csv")
ds_jobs.drop(columns=['Unnamed: 0'], inplace=True)
#ds_jobs.info()
Copy link
Contributor

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]
Copy link
Contributor

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)
Copy link
Contributor

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?

Copy link
Author

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)':
Copy link
Contributor

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

Copy link
Author

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')
Copy link
Contributor

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.

Copy link
Contributor

@mbcutts mbcutts left a 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!

@jaderall jaderall closed this by deleting the head repository Oct 5, 2022
@mbcutts mbcutts reopened this Oct 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants