Skip to content

Plot multiple lines in subplots

I’d like to plot lines from a 3D data frame, the third dimension being an extra level in the column index. But I can’t manage to either wrangle the data in a proper format or call the plot function appropriately. What I’m looking for is a plot where many series are plotted in subplots arrang…

Minimize the maximum difference

I’m trying to solve this Problem from GFG with following approach: But i’m unable to pass the testcases: I’m unable to figure out fault in my logic or code. Could some suggest corrections or better approach? Answer I’m unable to figure out fault in my logic or code. As per your current…

issues with discord.py “if channel.id ==”

I’m trying to make a bot that takes images from channel A and posts them to channel B when someone reacts to it. I have everything down so far except that it’ll also post pictures in channel B if someone reacts to one in channel C. I’m trying to use “if channel.id ==” but so far …

Calculate 14-day rolling average on data with two hierarchies

I am trying to calculate the 14 day rolling average for retail data with multiple different hierarchies. The ‘Store’ dataframe looks like this: What I am trying to do is create a rolling 14 day average for the purchases column for each store. The data extends well past 14 day (over 8 months), and …

django Count show different value after search

I simulate Instagram app. I have Followers, Actions models. Each action is done on a “follower”. Many actions can point to one follower. Admin panel: I then override the get_queryset for followers: I get really strange results in the admin panel: no search in panel USERNAME : lior___shahar BEEN FO…