Category "dataframe"

How do I change the values in a pandas column that are selected by a regex?

I'm cleaning up data for a personal project and am standardizing the large number of categories. The seemingly low hanging fruit have similar enough names such

how to get smallest index in dataframe after using groupby

If create_date field does not correspond to period between from_date and to_date, I want to extract only the large index records using group by 'indicator' and

Printing values in new columns based on a condition from another column

I have a following dataframe: Time Tab User Description 27.10.2021 15:58:00 Tab Alpha [email protected] Tab Alpha of type PARTSTUDIO opened by User A 27.10.2021

Comparing two panda dataframes with different size

I want to compare two dataframes with content of 1s and 0s. I run for loops to check every element of the dataframes and at the end, I want to replace the "1" v

Can I store a Parquet file with a dictionary column having mixed types in their values?

I am trying to store a Python Pandas DataFrame as a Parquet file, but I am experiencing some issues. One of the columns of my Pandas DF contains dictionaries as

Exchange NA with mean of previous and next value

I searched for an answer to how to exchange NAs with the mean of the previous and next values in a DataFrame for specifically one column. But I didn't find an a

Show Pandas Dataframe in for loop

I have a for-loop in which I build a pandas dataframe and everytime the loop starts over, the dataframe is updated. What I would like to do is to depict this ta

Trying to rename repeated columns in pandas DataFrame

I have a list of duplicate columns in my DataFrame (named as df here in the code) and I am trying to rename duplicate columns by adding a number in the end. For

Saving Pandas dataframe to SharePoint location as csv file

I want to save my transformed dataset to csv on SharePoint location. Can anyone help with how to approach. I have gone through Libraries shareplum but they read

how can I remove some NA rows but not all of them

I have multiple data frames with information about listed companies from the year 2000 So I want to put them in a list (lets call it df) because I want to do re

Is there a way to display a pandas Dataframe in KivyMD?

Is there a way to display a pandas DataFrame in KivyMD? I tried putting the dataframe as a KivyMD DataTable but it doesn't work that way.

Apply column name to row values unless nan or null

I'm attempting to add the column name of a dataframe to each row containing a non null value. A sample data set I am working with is: ID County Other

Write data frame to Excel file stored in Microsoft Teams using Graph API

I am new to working with APIs and especially MS Graph API so please excuse my ignorance. I work with data in R which is similar to Python, I have a data frame w

How to Ignore errors in Dataframe to_sql method

I am using Pandas DataFrame.to_SQL() to insert data from dataframe to table. Nothing gets loaded if even a single record has loading issues, for example: if a i

AttributeError: 'int' object has no attribute 'split' for pandas

AttributeError: 'int' object has no attribute 'split' Data is : print(df) Content Page no 0 My name is mark 3 1 My name is jeff

Fill dataframe with missing data in R

I have a code that counts how many points there are for each quadrant of 10x10 and shows the result in each quadrant I have this Dataframe qx qy n

How to unnest (explode) a column in a pandas DataFrame, into multiple rows

I have the following DataFrame where one of the columns is an object (list type cell): df=pd.DataFrame({'A':[1,2],'B':[[1,2],[1,2]]}) df Out[458]: A

How to unnest (explode) a column in a pandas DataFrame, into multiple rows

I have the following DataFrame where one of the columns is an object (list type cell): df=pd.DataFrame({'A':[1,2],'B':[[1,2],[1,2]]}) df Out[458]: A

Plot distribution of pandas dataframe depending on target value

I want to visualize the grade depending on the sex (male/female). My dataframe: df = pd.DataFrame( { "key": ["K0", "K1", "K2", "K3", "K4", "K5", "K6", "K7", "

Using Pandas dataframe, how can I highlight cells whose length > 5 on certain columns and output a new column to describe the error?

Given the following dataframe: | Item Part No 1 | Item Part No 2 | Random Header | | --------------- | --------------- | ------------- | | abcde |