Skip to content

Tag: python

Selenium / Use pagination on site?

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…

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 …

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…