Skip to content

Tag: python-3.x

How to save a tkinter canvas as an image

I would like to save my drawing on a tkinter canvas as an image so I can open it for later use. I currently use this save system from this post however this is not a good way for me. First I would need to add an offset and second if i set the application so only some part of

Getting Rolling Sum per Group

I have a dataframe like this: I would like to get the Sum of the last three months (excluding the current month), per Product_ID. Therefore I tried this: My code is failing, because it does not only calculate it per product, but it will give me also numbers for other products (let’s say Product 2, quart…