Skip to content

Python Regex DataFrame match

I have a DataFrame and I would like to perform a sorting if the match between my regex and the name of one of the lines of this DataFrame matches. Is there an option in the “re” library to help me? I try with this piece of code but without success Thank you in advance for your answers Answer I

Selenium retry URL when ValueError

How can I retry url from list if ValueError? Error: Or other exceptions. Can use if ValueError then driver.refresh(2wice) but I dont know location in the code: Maximum retry 2 Answer You can put the entire thing in a try/except block and if it encounters a ValueError at some point, you can put the same code u…

ModuleNotFoundError: No module named ‘flask-mysqldb’

I am using Windows10 Home,I have Python3.9.1 and Visual Studio Code.These are mu code: and I have about.html and index.html file.I know they are correct because I was use they another app. When I run this code I take this error.I am very new about the software.So I don’t know what should I do Answer You…

Regex pattern for filename with date

I have files with name “data_2021_03_v1.0.zip” in server. When I tried using “data.*(ZIP|zip)” regex.It is loading all files starting with data string. I want files containing only data(exactmatch-no extra words along with it) in filename. Ex: It is loading files with name “data_…

Opening .txt file in Python as Json file

I’ve searched Stackoverflow for a whole day, however I can’t seem to find the answer to my problem. I also tried several things, but it did not work; I don’t think the solution is very hard though, so maybe one of you can help me. The .txt file is the following format: It should be the follo…