i want to trigger the pagination on this site: https://www.kicker.de/bundesliga/topspieler/2008-09 I found the element with this XPATH in the chrome-inspector: Now i want to click this element to go one page further – but i get an error. This is my code: But i get this error: How can i go to the next pa…
Tag: python
How can I convince Python 3 to treat my text file as UTF-8?
I need a search and replace for a particular character in a few .php files contained in a local directory, under Windows OS. I tried one of the examples given as answer for Do a search-and-replace across all files in a folder through python? question, which in my case means this: While running it, I get this …
How to replace all the non-first values of columns with NaN based on date?
I have this dataframe: I want to replace the non-First values of the columns with NaN, for each day. This is how should the dataframe look like: This is what i tried: #i’m trying to use replace, but this does not consider the date Answer groupby + rank First create boolean mask with isna, then use group…
How to print only the start and endtime from a time log file(txt file) in python 3.8.10
This is the code I am using and I am getting partial output The txt file consists of the following elements: time.txt and the output i am getting is output here in the output the program is not printing till the end of the txt file , it is only printing till a certain line and stopping . dont know
How do I correctly add worker nodes to my cluster?
I am trying to create a cluster with the following parameters on Google Cloud: 1 Master 7 Worker nodes Each of them with 1 vCPU The master node should get full SSD capacity and the worker nodes should get equal shares of standard disk capacity. This is my code: This is my error: Updated attempt: I don’t…
How to inherent from a class that is already inherited from AbstractBaseUser in Django
I am trying to make an inheritance from a User class that is already inherited from the AbstractBaseUser but I am receiving an error that is telling me AUTH_USER_MODEL refers to model ‘authentication.User’ that has not been installed and I am sure I added the AUTH_USER_MODEL = ‘authenticatio…
Operating large .csv file with pandas/dask Python
I’ve got a large .csv file (5GB) from UK land registry. I need to find all real estate that has been bought/sold two or more times. Each row of the table looks like this: I’ve never used pandas or any data science library. So far I’ve come up with this plan: Load the .csv file and add header…
Numba: indexing a vector is giving an error
I started using python and numba recently. My problem is: I have a matrix (n rows and m columns).In a for loop I have to change the values of specific columns. Without numba, the code is running fine. But when I use njit(), it just crashes. Note: In my real project, each row don’t have the same values…
How to skip apply function for missing value cell in pandas
I have a Dataset as below : I write the code to calculate networkdays for these row have date value in column ‘End Date’ : however, I got the error below, I don’t know how I got this, could you please help look ? my expect output like below: Answer I believe the problem comes from how you ca…
How to map list of string to existing list of integer?
I have this string vocab file: https://drive.google.com/file/d/1mL461QGC5KcA3M1r8AESaPjZ3D_ufgPA/view?usp=sharing. I have this sentences file, made from all vocab file above: https://drive.google.com/file/d/1w5ma4ROjyp6xmZfvnIQjsdH2I_K7lHoo/view?usp=sharing. I want to map every sentences into its correspondin…