Skip to content

Tag: pandas

Check for max value of iterative sum in pandas

I have a pandas dataframe with some data: I’d like to sum them, one at a time, and at every summation check the totalt sum, an then extract the highest value achieved of the total sum. So the first sum would be element 0, with a value of -0.000601, the send would be -0.000601 + 0.000001=-0.0006, and thi…

Python/Pandas bring value based on another DF

I have two dataframe, below I am trying to fill df[“Possibilites”] with df2[“first_name”] if key_words in df2[“first_name”] with this code: it returns what i expect but gives a warning also: ” SettingWithCopyWarning: A value is trying to be set on a copy of a slice fr…

How to show data by day in a Plotly chart

I have a dataframe with the number of people vaccinated per day and I’m trying to put this data in a daily bar chart of Plotly, but it aggregates the data every about 13 days. I don’t want the aggregated view this way, I need it to show the bars per day. Below is a part of the dataframe and