Category: Python

for loop taking too long to run

i have a column named data2 in dataframe df1 that contains list of nested dictionaries in each rows. there are total 50983 rows. i used the...

How to deal with columns in pandas dataframe?

I want to do something with column data which is a list. like: inputs: col-A [{‘name’:’1′,’age’:’12’}, {‘name’:’2′,’age’:’12’}] [{‘name’:’3′,’age’:’18’}, {‘name’:’7′,’age’:’15’}] …. outputs: col-A [{‘1-age’:’12’}, {‘2-age’:’12’}] [{‘3-age’:’18’}, {‘7-age’:’15’}]...

split string object into pandas columns

Hello World, I have a serie object containing 3 columns (name, code, value) which I get from the below function: def get_fuzz(df, w): s = df[‘Legal_Name’].apply(lambda...