I want to create a Sankey diagram in plotly dash related to a time dropdown. I guess I'm not really understanding how to do so! The dropdown is done correctly, but the Sankey is kind of hard for me. I have a dataframe with multiple columns which I want them to be the source (sum of their values), and multiple columns which I want them to be the target separated. As I said earlier, I'm not really understanding how to configure that. Could anyone help me with that? Thank you...
Asked
Active
Viewed 385 times
0
-
1Could you share some sample data and the code you have so far? – Peter Leimbigler Sep 27 '21 at 11:08
-
I managed to do a Sankey diagram, but now I have a problem in pandas! The dropdown is to select a year, so in pandas I want to group my columns values by year and do the sum of each column during that year. Doing that, I'll be able to choose a year in the dropdown and the data will be filtered for that year. How can I do so? – jackie Sep 27 '21 at 15:12
-
Glad to hear the Sankey worked out. This sounds like a different enough issue to ask a new SO question (with sample data and runnable code) :) – Peter Leimbigler Sep 27 '21 at 15:19
-
Hi and welcome on SO. It will be great if you can have a look at [how-to-ask](/help/how-to-ask) and then try to produce a [mcve](/help/mcve). – rpanai Sep 27 '21 at 16:16
-
Does this answer your question? [Pandas group by and sum for each month](https://stackoverflow.com/questions/69349243/pandas-group-by-and-sum-for-each-month) – Rob Raymond Oct 03 '21 at 13:58