Sep-07-2023, 05:19 AM
Hi, im new to Pandas, Python and all this awesomnes !
I learn hard way ...
I have few things im confused about.
Im trying to sort and visualize with graphs but separate by years.
Count column created by grouping. My range would be from 2000 but no end date and i want to do it for each month but cant find how to implement exact month as well.
So by the end of the day it should be - January - all data from January just need to be filtered by year with selector, next tab is February so same as January but February and so on. ( i have tabs already )
Also i would like to rename fields inside graph and be able to choose a year. I have a selector but it does nothing, my graph does not changes but if you look at THIS IMAGE it separates my bar with dotted line for each year.
Also - would it be safe to combine week 52 with week 53 if yes - how ? as far as i understand - week 52 is part of the week 53 or week 53 is part of week 52 and week 1 ?
Im also looking for info how to rename things inside charts as px.bar will show column name.
And also select Market and show on graph with all years . Lets say it shows all available years from earliest date available in my dat frame and i select area i want to look at to see difference between each year.
Add percentage difference from earliest year posible. I got game cd in 2000-1-1 next franchise came out 20010 and i got cd again but different price. i want to use my first CD as 100% and second cd price would show me a difference in percent - was it cheaper or more expensive .
I do all of this inside streamlit.
Thank You.
I learn hard way ...
I have few things im confused about.
Im trying to sort and visualize with graphs but separate by years.
df_mc = pd.DataFrame(df.groupby(['PMarket', 'PuYear']).size().reset_index()) df_mc.columns = ['PMarket', 'PuYear', 'Count'] fig1 = px.bar(df_mc, x="PMarket", y="Count", color='PMarket', range_y=[0,100])But it shows me total of all years combined and selector wont work due to my "groupby function ?
Count column created by grouping. My range would be from 2000 but no end date and i want to do it for each month but cant find how to implement exact month as well.
So by the end of the day it should be - January - all data from January just need to be filtered by year with selector, next tab is February so same as January but February and so on. ( i have tabs already )
Also i would like to rename fields inside graph and be able to choose a year. I have a selector but it does nothing, my graph does not changes but if you look at THIS IMAGE it separates my bar with dotted line for each year.
Also - would it be safe to combine week 52 with week 53 if yes - how ? as far as i understand - week 52 is part of the week 53 or week 53 is part of week 52 and week 1 ?
Im also looking for info how to rename things inside charts as px.bar will show column name.
And also select Market and show on graph with all years . Lets say it shows all available years from earliest date available in my dat frame and i select area i want to look at to see difference between each year.
Add percentage difference from earliest year posible. I got game cd in 2000-1-1 next franchise came out 20010 and i got cd again but different price. i want to use my first CD as 100% and second cd price would show me a difference in percent - was it cheaper or more expensive .
I do all of this inside streamlit.
Thank You.