Hi all, I was unsuccessful with my last question in this group because my code was too long. I have now brought my code to a minimum and added a screenshot. I hope this time everything is clear and not confusing. My question is: how can I check the variable “val” in Tab1 whether it is smaller than 5. If
Beautifulsoup: extracting td list in table
I’m stuck with a BeautifulSoup problem that I think is simple but I can’t seem to solve. It is about extracting each td from the following table to create a loop and a list: What I need is to create a dictionary with some elements of each tr to create a dataframe later. I would like to have a list
Discord.py Stuck Trying to Loop Through Logs and Send to Server
I am trying to create a simple discord bot that parses a log file that is constantly being written to and sending the new lines to a discord channel I have on my server name logs. Parsing the file and printing the output is easy and works just fine. My problem is trying to incorporate it into discord. It seems
Using pandas dateoffset and step forward num_years (given by a column)
I have a dataframe with column of datetime “Date_Begin”. I have another column “Years_to_add”. I want to calculate a third column with the “DateBegin” stepped forward by the number of years in the “years_to_add” column. I want to avoid using approximations like 365.25 in a year. I want simply add the number of years in a calendar sense (I know
How to update a frame with a scrollbar linked in it that has buttons so that it updates and works correctly when adding buttons?
I’m writing an application in tkinter which has the following structure: Notebook Tab (frame on the notebook) Canvas (on the frame) SecondFrame (on the canvas) ← this is where I want to pack my buttons MyButtons (on second frame) While scrollbar is linked as expected to my canvas. Lets say I have 20 buttons when running the program and by
Run Jenkins Job In Python Using Token
I want to run Jenkins job with the use of tokens. But this piece of code gives 403 error. How to avoid this problem? I will not use username and password, Only token. Is there any way to do this? Code: Answer Refer to this. Jenkins doesnt do authorization. So even after you have generated authorization key you need to
AttributeError: format not found – pyodide + joblib.dump + scikit-learn (TfidfVectorizer)
I have pickled a SMS spam prediction model using pickle. Now, I want to use Pyodide to load the model in the browser. I have loaded the pickled file using pickle.loads in the browser: This works. But, when I try to call: It gives an error(in vectorizer.transform): AttributeError: format not found Full error dump is below. In Python it works
converting a Django ValuesListQuerySet object to a float
i have time data saved (in epoch time) in a MySQL database as a IntegerField. i’m doing some data visualisation where i’d like to show orders by the hour and by day of the week as bar charts, so i’d like to convert these epoch times to date time objects and visualise the data accordingly. however, datetime.datetime.fromtimestamp() only takes in
Check column for variable and get value from another column in matched row
How can I get the values of one column in a csv-file by matching attributes in another column? CSV-file would look like that: I only want to get the values of column 3, if they have the value “car” in column 2. I also do not want them to be added but rather have them printed in a list, or
Fastest way to check pandas dataframe and show other elements in the other columns at the same row
If there is a list of words to check… and a data frame like What is the fastest way to find the corresponding scores for each word in the given word list? For example, 40, 20, 10 for ‘word3’. Answer To elaborate on comments above: Output: If you don’t want to set Word as index, you can also use .iloc: