I have time-series sales data. First I group-by the sales by a year. Than I want to forecast the sales for the years 2021,2022 and 2023. I have data from the year 2000. My question is similar to this one, however I want an answer on how to make forecast outside of the training index. If I do this the
NetCore 3.1: How to execute python.exe using Process on Azure?
I have a NetCore3.1 server app. On my local setup I can use Process to execute python to do some dataframe crunching that I have installed in a venv. On Azure, I can use site extensions to install a local copy of python and all my needed libs. (It’s located in D:/home/python364x86/). Now on my published Azure app, I want
list in dictionary get empty out when coming out of the loop
This is the code I wrote for web scraping purposes. I want to save all data in the dictionary and then save that data into a dataframe. Up to the last iteration, it saves the dictionary, but when coming out of the loop all lists (that are the values of my dictionary) are empty. How can one fix that? This
Covert Binary Tree to Doubly Linked List (Microsoft Interview)
We are converting a binary tree into a DLL, in place also we are using in order traversalto do so. Read more here – Link My Code: My problem: The head is always None and hence I cannot print the converted list. What is wrong with this code or my logic? Answer Your code has many Pitfalls, the main reason
Selenium – Wait for the ScrollIntoView to finish
I need to scroll to an element and take a screenshot of the page but the driver takes the screenshot before the page is completely scrolled to the element. I’ve used a time sleep in this way but I really don’t want to use sleeps since they are not test-oriented. I’ve tried to wait for the element to be visible
Getting column mean by summing values of another column
I have a Dataframe with three columns Customer, Purchase amount and Purchase date. I need to get sum of Purchase amount of customer purchases for each day, then get mean of purchases for each customer for one month. I’ve tried to use df.pivot_table() but it takes mean of purchases for one day and then mean of purchases for one month.
removing URL from string using python’s re
Using this to try to remove URLs from a string: Unfortunately it works for simple URLs but not for complex ones. So something like http://www.example.com/somestuff.html will be removed but something like http://www.example.com/somestuff.html?query=python etc. will just leave trailing bits behind. I think I’m at the limits of my re knowledge so any help will be much appreciated. Thx. Answer Try: r”https?:[^s]+”
Iterate over 2D numpy array to find corresponding maximum values
I have a set of data as such: I need to iterate over each value in the first column, find the corresponding maximum value in the second column and then store in a new array (or delete the other values from this array). For this example the final output would therefore be: I have managed to write a piece of
odoo PyCharm configuration / no module named ‘odoo’
I’m newbee in programming and I need some help. I have to work with PyCharm and Odoo, so my point is to configure PyCharm for Odoo debugging. First of all I made a module and a model, it perfectly work with database(i can see and check it). I want PyCharm not to highlight word ‘odoo’, ‘models’ and ‘fields’ by red
How to downcast numeric columns in Pandas?
How to optimize the data frame memory footprint and find the most optimal (minimal) data types dtypes for numeric columns. For example: Expected result: Answer You can use parameter downcast in to_numeric with selectig integers and floats columns by DataFrame.select_dtypes, it working from pandas 0.19+ like mentioned @anurag, thank you: