Category "python-3.x"

Adding new dataframe colonms using information extracted from the url in the url column, but the url could be missing information

Given: A pandas dataframe that contains a user_url column among other columns. Expectation: New columns added to the original dataframe where the columns are co

Getting `A value is trying to be set on a copy of a slice from a DataFrame.` when setting a column

I know a value should not be set on a view of a pandas dataframe and I'm not doing that but I'm getting this error. I have a function like this: def do_somethin

Pip Install failure with error TLSV1_ALERT_PROTOCOL_VERSION in RHEL 8

I am getting error when installing packages using pip install on RHEL8 version WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=

MetaData Generation Failed while installing PyQt5

I have a similar problem as AttributeError: module 'sipbuild.api' has no attribute 'prepare_metadata_for_build_wheel' for PyQt5 5.15.0. Most of the solutions pr

How to build python package for other PC?

Environment PC1: Dev-machine, online, Python install dir: C:\Python310 PC2: Target machine, offline, Python install dir: C:\Program Files\Python310 Doing Write

How __iter__ works for printing linked list

I'm trying to learn linked lists and I'm stuck at the point where the instructor wrote down the __iter__ method. Although I particularly don't understand the pa

Python datetime i need specific 30 second execute for loop

i need python loop condition execute every 1 minutes specific seconds loop run for an example now time 15:50:12 that time for loop run 15:40:30 next wait local

Why am I getting NANs when concatenating a Data Frame with a Series

I have a Pandas Dataframe ('a') and a Series ('b') both with timeseries index (weekends excluded). I am trying to concatenate them. Both of them start with the

When I gave command on CMD manage.py runserver it instead took me into VS Code and when i ran it in VS code error was on (from django.core.management)

When I ran the command on CMD manage.py runserver it intern redirected to VS Code. When I tried to run on VS Code it showed the system cannot find the specified

CPU Percentage Scan

I need to scan through all running processes and filter the ones with high usage. I currently have the code bellow but is taking too long to scan through them.

Dependencies issue while installing model card toolkit

Model Card --> Model Card toolkit I want to install a model card toolkit in my python virtual environment through this command: pip install model-card-toolk

Serverless deploy from M1 MacBook Pro causes invalid ELF header error

I have a serverless REST api connecting to MongoDB atlas. When making changes and running sls deploy everything deploys as normal. But when I query the DB from

Compare 2 csv files and remove the common lines from 1st file | python

I want to compare 2 csv files master.csv and exclude.csv and remove all the matching lines based on column1 and write the final output in mater.csv file. master

How to run Django admin site on Android

This is what am facing with with Django on my Android I'm using Pydroid on my phone. Python and Django are fully functional. But when I try to run Django admin

ValueError: Compute method failed to assign custom.module(11,).historial_ids in Odoo 14

I've only been learning odoo-14 for 2 weeks. There are three compute functions in my code. But I got the error: Odoo Server Error Traceback (most recent call

how to use keygen.sh API for python

really sorry I am a noob coder trying to make it so users need to have entered a license key that gets stored on the local computer & checks the policy from

Django can't save userprofile instance during saving forms

I am getting this error Cannot assign "<QuerySet [<UserProfile: UserProfile object (131)>]>": "BlogComment.userprofile" must be a "UserProfile" ins

How to go through all Pydantic validators even if one fails, and then raise multiple ValueErrors in a FastAPI response?

Is it possible to call all validators to get back a full list of errors? @validator('password', always=True) def validate_password1(cls, value): password =

In openpyxl, is there a way to see what conditional formatting rule(s) are applied to a cell?

I'm using openpyxl 2.5.6 and py 3.7.0. My goal is to read an Excel workbook and print both the contents and the formatting of each cell into a CSV. For instance

Not able to use rasa x with current version of rasa

Rasa forum says that rasa x 1.1 supports rasa 3.x, but when i try running rasa x on a model trained with rasa 3.1 it gives me error. UserWarning: Your version o