Category "python"

pint: electron_volt as base unit

Is there any way to have the composed unit eV as a base unit in pint using a straight forward combination of @system, @group and possibly some contextual conver

Read all rows and columns in MS project via MPXJ library using python

So am trying to read .mpp file in python using MPXJ library, i was able to get task Name, respective task start/end date etc. I want to get the respective type

Formula Cell Wont Update Openpyxl

I fill the cells I need, then I set the total formula. It works right in one column, with normal numbers, but in the column with times (hh:mm:ss) the total cel

Why Selenium webdriver with Python can't reach to a website

I am trying to use selenium with chrome driver to connect to a website. But it couldn't be reached. Here is my code: from selenium import webdriver fro

How to replace/extend Django shell with Rich?

Django allows to replace its default shell with more capable ones like ipython and bpython. Is there a way to replace/extend the default Django shell with Rich?

Splitting an ONNX DNN Model

I'm trying to split DNN Models in order to execute part of the network on the edge and the rest on the cloud. Because it has to be cross-platform and work with

Deterministic variable in posterior predictive samples

When generating posterior predictive samples using pm.sample_posterior_predictive the result only shows the observed variable. How can I access deterministic va

Error using Selenium Chrome Webdriver with python

hi im using chrome driver but i cant fix this error mycode: options = Options() options.add_argument('--disable-gpu') options.add_argum

Accessing DynamoDB Local from boto3

I am doing AWS tutorial Python and DynamoDB. I downloaded and installed DynamoDB Local. I got the access key and secret access key. I installed boto3 for python

Best way to compare two large files on multiple columns

I am working on a feature which will allow users to upload two csv files, write the rules to compare the rows and output a result into a file. Both files can ha

How to reshape my dataset in specific way?

I have a dataset: name val a a1 a a2 b b1 b b2 b b3 c c1 I want to make all possible permutations "names" which are not

Can I pass a dict to where() in SQLAlchemy?

Rather than selecting rows by a static set of columns, e.g. stmt = select(User).where(and_(User.first_name == 'foo', User.last_name == 'bar')) I would like to

How to perform Recursive Feature Elimination (RFE) with LSTM as estimator in python?

I am trying to identify the important features in a data frame containing stock data. I plan on using LSTM to predict closing prices later on. I currently have

How to create a new columns based off of values of other columns which could contain #s or NaN?

I have a few dataframes that I'm merging based on known, populated fields. The resulting dataframe will always contain a set of columns, but may or may not have

AttributeError: 'numpy.ndarray' object has no attribute 'transform'

I want to create a sklearn pipeline that consists of two steps: Custom transformer function Keras classification model This is my data set (of course, I'm provi

Add a new record for each missing row in a DataFrame with TimeStamp without replacing the original records

Be the next Pandas DataFrame: | date | counter | |-------------------------------------|------------------| | 2

How can I read this csv data?

I'm getting an error: Error tokenizing data. C error: Expected 1 fields in line 88, saw 4 while trying to read this data: import pandas as pd df = pd.read_csv

ModuleNotFoundError: No module named 'jsonschema.compat'

I have been working with the Bybit API for the last week when I encountered the title problem yesterday. I have started a new env and installed only the bybit w

Running keyboard module in python is returning weird characters

I am running a python script to capture keyboard input in order to read a bar code reader scanner on a debian 9.0 system, the bar code reader is supposed to wor

Error while using Firefox headless, Selenium and Python

I am trying to use firefox headless, Selenium framework and Python to fetch webpage on Amazon EC2 Ubuntu linux. My code looks like this: from selenium import we