Skip to main content

Questions tagged [python]

Python is a dynamically typed, multi-purpose programming language. It is designed to be quick to learn, understand, and use, and enforces a clean and uniform syntax. Note that Python 2 reached end-of-life on January 1st, 2020. For version-specific Python questions, add the version tag (e.g. [python-3.x] or [python-3.9]). When using a Python variant (e.g. Jython, PyPy) or library (e.g. Pandas, NumPy), please include it in the tags.

python
0 votes
0 answers
3 views

How can i "add" additional Data (Classification-Codes) to an existing Field

I have build a model which should representate our Products at work. Our products are different sorts of luminaires. Some of these with different variations like different colour-temperature, ...
RegShoe's user avatar
1 vote
1 answer
12 views

Unexpected Behavior of pd.Grouper with datetime Key and freq Argument

Issue Description When using pd.Grouper with a defined frequency for grouping dates in pandas, there is an unexpected behavior where dates that are expected to be grouped into the previous period ...
professor_tornasol's user avatar
0 votes
0 answers
3 views

How Can I Load CSV File in PySpark by Matching Column Names with the Schema?

I am loading multiple CSV files using Python Spark. Below is the code: spark.read.format("csv").option("header", 'true').schema(table_schema).load(file_path) In this code, I am ...
Dhainik Suthar's user avatar
-2 votes
1 answer
19 views

Problem with converting number to corresponding alphabet

My code is to take a string and reverse the number placement of each alphabet, a=27, z=1. so, a=z and b=y, encrypting the input in this pattern input = input() for character in input: number = ord(...
Ghandi's user avatar
  • 1
0 votes
0 answers
7 views

Python xlwings slow Execution when scanning Excel Sheet

I'm a beginner at Python. This code is for scanning Excel cells by range using xlwings however the process is very slow. I strictly need to use xlwings since it can retain my images and shapes unlike ...
Vinz's user avatar
  • 1
0 votes
0 answers
8 views

Does coint from statsmodels.tsa.stattools in python consider stationarity?

At the base level I am trying to determine if two stocks are cointegrated. To that end I take the adjusted close data of two stocks and call coint on this data. However I am unsure if the coint test ...
AAM's user avatar
  • 87
0 votes
0 answers
7 views

Error in RAGAS: "embeddings must be set" when using answer_similarity in FastAPI

I'm developing a REST API using FastAPI, and I'm trying to calculate the similarity between answers using the RAGAS library. However, I encounter an error that says embeddings must be set. Here's a ...
FranzF's user avatar
  • 123
0 votes
0 answers
13 views

How can I copy part of a word file to another word file using Python

"My goal is to write a Python script that copies content between specific flags, such as {{START}} and {{END}}, from one Word file and pastes it into another Word file at a designated location. ...
Fedor Bilirov's user avatar
0 votes
1 answer
13 views

How to add one variable part in dataframe name in pyspark?

Like i want to add today's date in dataframe name df_2024_jul_05 = spark.table("tablename") here the bold part is dynamic in nature i tried the below code: x = "df_"+str(date.today(...
Rijoy Thanalil's user avatar
0 votes
1 answer
17 views

How do I scrape a whole table when they all use the same class?, I can so far get the names only

I'm trying to get the data in the table labelled "Key rates". However, I can only extract the Names as they have a unique style ( ). I want data from the table and arranged into a table by ...
Learner's user avatar
0 votes
0 answers
14 views

Multiple files into single commit using PyGithub

I'm trying to add multiple files into a single commit using PyGithub. I'm looping in my local directory to fetch all the files to be committed and then I'm trying to create a git blob for each. Then I'...
Arunava Paul's user avatar
-1 votes
0 answers
16 views

How Can I Improve Real-Time Face Matching and Display Efficiency in a Multi-Camera System Using OpenCV and Dlib?

I am working on a real-time face recognition project where I have two cameras (Camera X and Camera Y) set up to capture images of people passing by. The goal is to match faces from Camera X with those ...
GALI YASWANTH SAI 2022-2026's user avatar
-1 votes
0 answers
13 views

write a function in python in which I have to save the PDF in the dynamic folder downloaded from the website with his account number [closed]

I want to write a function in Python in which I have to save the PDF downloaded from the website with his account number and my account number is in the excel sheet.below is my code please assist ...
Nikhil Varkute's user avatar
0 votes
0 answers
18 views

How can I edit this python script to automatically apply the excel formula to show the results when opened?

I have a spreadsheet that is opened via the package openpyxl and I want to apply a specific formula to every cell in row 14 "N" down to the bottom of my current table but make the formula ...
John12345's user avatar
-3 votes
1 answer
25 views

Function returning "None" [duplicate]

I wrote the short program below while practising how to use a custom function. def square(num): square==(num**2) print(square(10)) return I was expecting that when I call the function: ...
techgo limited's user avatar

15 30 50 per page
1
2 3 4 5
146830