How to set a column which suffix name is based on a value in another column
#Column X contains the suffix of one of V* columns. Need to put set column V{X} to 9 if X > 1. #But my code created a new column ‘VX’ instead of updating one of the V* columns import pandas as pd df = pd.DataFrame({‘EMPLID’: [12, 13, 14, 15, 16, 17, 18], ‘V1’: [2,3,4,50,6,7,8], ‘V2’: […]
Replace ‘None’ from dataframe with user created string
below is my dataframe code
Replace ‘None’ from dataframe with user created string
below is my dataframe code
How to apply the capitalize with condition?
I’m wondering how to use the capitalize function when another column has a specific value.
For example, I want to change the first letter of students with Master’s degree.
Dataframe set all in group with value that occurs first in corresponding multi columns
I have multiple A* columns with corresponding B* columns (A and B have the corresponding numbers at the end of the column names).
When the REFNO value = A# value and the ‘MNGR’ is not BOB,
I need to put the value from corresponding B# column into the ‘AGE’ column and the corresponding # number in the ‘FLAG’ column
Retrieve data from Excel whose values are formulated
I am trying to read excel which is formulated means some values in excel is driven from formula I have tried two approach but I don’t receive any value. I get ‘None’. Can someone of you review my code and help me please?
set the value of Column B based on the value in the column name that corresponds to Column A value
I have an example dataframe:
Set column A value by choosing another column name based on column B value in python dataframe
enter image description hereI have the following dataframe as shown in the figure. I want to set the value of Column B based on the value in the column name that corresponds to Column A value. For example, Column A first row reads “Value A”, so look for Value A column and find “aaa”. Any hint on how to do this? Thank you
Setting incremental number for rows in dataframe based on multiple columns
I have a data frame with 3 columns:
How to split a info in a single row in excel into columns using python
Hi there I have read a csv file using pd.read_csv()