Skip to main content

All Questions

Tagged with
1 vote
2 answers
51 views

Python Pandas data frame column split based on previous unique columns combination [duplicate]

I have a data frame like below: TAG TAG_NAME METRIC METRIC_NAME CAPTURE_DATE MB DB PRO SPACE A 2024-03-01 3 DB PRO SPACE B 2024-03-01 4 DB ...
Shanzid Hossain 's user avatar
0 votes
1 answer
154 views

Issues when opening a pickle file created in python 2.7

I have several pickle files compiled wiht Python 2.7 that are readable with pandas in Python 3.11 however there's one that has won't load. This is the part of the code where I'm facing issues: import ...
Sososof's user avatar
0 votes
0 answers
15 views

how can I compare similarity between strings from two tables (one to many) in MySQL table using python [duplicate]

I have 90K rows in "table1" and 95k rows in "table2". I tried with the below code to compare every rows from table1 to table2. But it takes 1 minute to complete the 1 row from ...
Dhileep's user avatar
  • 57
0 votes
1 answer
243 views

How to store temperature and humidity data's in excel file using pandas and update that data after some time then the updated data stored in each row?

I am working with ESP32 and AHT25 to measure temperature & Humidity data. I need to store that data into Excel file. I am using pandas library to store this data in csv file, My code for that is, ...
Kuralmozhi's user avatar
0 votes
0 answers
26 views

Background Job Killed After 2-3 hours without any error on logs

I am running a machine learning job. The Job produces parquet files. Each file size is 30-40MB. Total size of the these files is 11-12 GB. Below piece of code I am having to create panda data frame ...
Rajesh's user avatar
  • 51
1 vote
1 answer
58 views

Append the column names corresponding to the minimum row values of a dataframe to create a new dataframe

I have the following dataframe import pandas as pd data = [[5,4,3,2,6,8], [9,1,5,4,8,6], [7,6,8,1,2,4], [9,6,5,4,8,3]] df = pd.DataFrame(data, columns=['Col1','Col2','Col3','Col4','Col5','Col6']) df ...
Pranab's user avatar
  • 429
0 votes
1 answer
84 views

How do I replace column names in a list with column values in the same row? [duplicate]

I've got a dataframe where 1 column lists Max value column names, Based on the names I'd like to replace them with those column values on the same row Max Column A Column B Column C Column C 200 500 ...
sw233's user avatar
  • 23
0 votes
1 answer
39 views

Check if one column elements are there in another master list of elements and if yes, label a third column with 1 of same index if it does exist

This is a data frame with 5 columns. I was looking to solve with Python. I tried converting list_1 and list_2 into actual lists and comparing to the master list column but didn't work. Any help is ...
Sachin Santhosh's user avatar
0 votes
0 answers
69 views

Importing Excel file into Panda (Python) using conditions

I am using Python 2.7.18.4 (I know an old version, but I cannot change) to import a set (probably around 1000, maybe more) of Excel files. Each Excel file contains the same column I am interested, but ...
Cliff's user avatar
  • 69
0 votes
1 answer
495 views

How do I copy/paste merged cells from excel via python?

I tried using openpyxl and had a lot of trouble, now im trying pandas and an getting tons of tracebacks. Seems like copy pasting merged cells is hard and very specific, either that or im just a nooby. ...
Howdy's user avatar
  • 1
0 votes
2 answers
38 views

Merge dataframes having array

I have two data frames. DF1 isActive,trackedSearchId True,53436615 True,53434228 True,53434229 DF2 trackedSearchIds,Primary Keyword Group(s) "[53436613, 53436615, 53437436, 53436506]",SEO - ...
Avenger's user avatar
  • 847
0 votes
1 answer
307 views

Capturing part of file name in a Dataframe in Pandas

I am reading a csv file in pandas. The csv file has dates appended as part of its name i.e test_280323.csv. i do some filtering on the CSV in pandas and then create data frame to store the operation ...
syed's user avatar
  • 9
0 votes
1 answer
356 views

FutureWarning: Indexing with multiple keys (implicitly converted to a tuple of keys) will be deprecated, use a list instead [duplicate]

I created a dataframe team3 team4 Dummy 0 F YG 10 1 g Gh 10 2 h Ya 10 3 i nG 10 4 k Yb 10 5 l Yf 10 6 m jk 10 and i'm trying to get expected output as below ...
charancherry's user avatar
1 vote
3 answers
105 views

How can I assign a tag to the smallest in one group, second smallest in another group and third smallest in the third group to a pandas dataframe?

I have the below data frame, ID Group Date_Time_1 Date_Time_2 Difference New_Column 123 A 14-10-2021 15:19 14-10-2021 15:32 13 First 123 A 14-10-2021 15:19 14-10-2021 15:36 17 null 123 A 14-10-...
Kajal Singh's user avatar
0 votes
1 answer
71 views

To distribute to people according to percentage values

I have an algorithm that I want to create. The structure of this algorithm should be as follows. Below is a CSV file defined in the code block. In this file, each customer has specific weights. The ...
OKAY SANDAL's user avatar

15 30 50 per page
1
2 3 4 5
280