How to Filter pandas dataframe [Error : list indices must be integers or slices, not str]

I have dataframe loaded in colab, my data look like this id parent_name_1 parent_name_2 1 NUll Apricots 2 Apple Red Apple 3 Null …

Converting string in a Pandas data frame to float

I have the following data frame: Bestand = pd.DataFrame({‘ISIN’: [‘NaN’, ‘IE00B4X9L533’, ‘IE00BF4RFH31’], ‘Marktwert’: [‘217.803,37’, ‘47.755,10’, ‘15.353,32’]}) In order to calculate …

Format the extracted covid vaccine data from website

Trying to format the “Vaccine data” from URL to pandas dataframe https://www.mygov.in/sites/default/files/covid/vaccine/covid_vaccine_timeline.json Here is the parent website https://www….

Is there an easy way to establish a hierarchy between entities using only 2 ID fields?

I have a table with 2 fields like so: Account_ID Parent_ID x y x1 y x2 y y z y1 z y2 z z z z a z1 a a a b b The IDs fields are both in int64 format. The first field represents accounts …

Combining unique elements of a DataFrame in a list

I’ll try to ask my question as clearly as possible. I have the following DataFrame which looks like this import pandas as pd data = {‘player’ : [‘A’, ‘A’, ‘A’, ‘B’, ‘B’, ‘B’, ‘C’, ‘C’, ‘C’], ‘…

Create new pd dataframe column that gives a date based on day and week starting data

I have a pandas dataframe that has two columns, the first column is ‘Week Starting’ and the other is ‘Day’. I wanna create a new column that uses the data from the other two columns to give a full …

Converting list to comma separated integers to be substituted in IN clause of Pandas dataframe query

I have a list of integers that contains EMPI_ID emp_list = [1,2] I have a variable that defines the SQL query emp_sql = ”’ select emp_id , emp_name from emp where emp in (%s) ”’ Columns …

How can I get unique values from csv?

I have a small question. How can I print all the texts belonging to that author by selecting the author from the csv that I read with the pandas below, can you help with the python code? (ex. I want …

Find Word in a csv file and implement it using loops

I am having a dataframe named df which is having two columns, Company name Company website 0 Maersk Drilling http://www.maerskdrilling.com/ 1 CICLAGUA SA https://simetriagrupo.com/ 2 …

How to combine queries with a single external variable using Pandas

I am trying to accept a variable input of many search terms seperated by commas via html form (@search) and query 2 columns of a dataframe. Each column query works on its own but I cannot get them to …