Skip to main content

All Questions

Tagged with
1 vote
2 answers
59 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
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
423 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
1 vote
1 answer
66 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
  • 479
0 votes
1 answer
92 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
40 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
81 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
  • 79
0 votes
1 answer
735 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
39 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
  • 877
0 votes
1 answer
523 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
  • 11
0 votes
1 answer
412 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
117 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-2021 15:...
Kajal Singh's user avatar
0 votes
1 answer
76 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
1 vote
2 answers
59 views

Get the list of names which satisfy the condition in dictionary from given list

I have a dictionary in which there are three conditions startwith, contains and endwith given below, dict1 = {'startwith':"Raja, Bina", 'contains':"Tata", "endwith":"...
Mohit's user avatar
  • 137
0 votes
1 answer
151 views

Reading netcdf time with unit of years

All, I am trying to read the time coordinate from Berkley Earth in the following temperature file. The time spans from 1850 to 2022. The time unit is in the year A.D. (1850.041667, 1850.125, 1850....
Kernel's user avatar
  • 743

15 30 50 per page
1
2 3 4 5
279