I’m writing a Python script that needs to write collections of data down specific columns in an Excel document. More specifically, I’m calling an API that returns a list of items. Each item in the list contains multiple fields of data (item name, item version, etc). I would like to iterate through each item in the list, then write selected
Category: Questions
python to get substring of an excel cell with a condition
I’m trying to concatenate several csv files and create a ‘DATE_TIME’ column based on the specific column ‘NAME’. I apply an IF condition for extract the substring of DATE_TIME from NAME based on the appearance of a string ‘RE’. Here’s my code: My question is at the IF-ELSE statement. They return the same position of the substring, so that I
python: tkinter/urllib/requests – GUI not responding when running download command
I tried making a GUI where there is a download button and it downloads a file from the internet. There is also a progressbar which shows progress of the download.. the whole code: but when i click on the download button, the whole window stops responding.. and after some time, when the download is finished, it responds.. and the progressbar
Installing scipy and scikit-learn on apple m1
The installation on the m1 chip for the following packages: Numpy 1.21.1, pandas 1.3.0, torch 1.9.0 and a few other ones works fine for me. They also seem to work properly while testing them. However when I try to install scipy or scikit-learn via pip this error appears: ERROR: Failed building wheel for numpy Failed to build numpy ERROR: Could
how to separate list to different tables & print the tables to individual pages pdf in reportlab?
I have a list of lists and i want to create a different table per list: 1 list into 1 table per page, just like this: how do i separate the list into different tables? and have them on different pages using reportlab? assuming that the number of the lists is not always 2 because the data came from a
cannot import name ‘stop_words’ from ‘sklearn.feature_extraction’
I’ve been trying to follow an NLP notebook, and they use: However, this is throwing the following error: My guess is that stop_words is not (or maybe no longer) part of the ‘feature_extraction’ part of sklearn, but I might be wrong. I have seen some articles that used sklearn.feature_extraction.stop_words, but at the same time I see places which have used
How to solve the ‘mul objective has no attribute ‘cos’ ‘
How to solve the multi object problem? If I input 2, the expected result should be 2*cos(2*x). Answer Your code contains a few misconceptions. One problem is an important general programming rule: try to use different variable names for variables with different meanings. So, x shouldn’t be assigned a float, as it was a symbolic variable before. And derivative_f being
Adaptation module design for stacking two CNNs
I’m trying to stack two different CNNs using an adaptation module to bridge them, but I’m having a hard time determining the adaption module’s layer hyperparameters correctly. To be more precise, I would like to train the adaptation module to bridge two convolutional layers: Layer A with output shape: (29,29,256) Layer B with input shape: (8,8,384) So, after Layer A,
Python Selenium Edge Browser in Internet Explorer mode
I got a website which is just compatible with Internet Explorer. We activated the Edge Internet Explorer Mode Option, but im unable to handle the website with Selenium. Is there any way to use IE-Mode with Edge in Selenium? Answer You need to download the recommended version of IE Driver Server from this link then refer to the code below
Return list of True/ False bool value for list of leap years given as an argument
I have to check whether year = [1900, 2020, 2021, 2001] is a leap year or not and get True/False as a result (Boolean) I have written a function as : But now I need to pass a list as year = [1900, 2020, 2021, 2001] and when I am doing so I am getting an error as “TypeError: unsupported