Relative Content

Tag Archive for pythondataframe

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’: […]

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.

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?