[BangPypers] My querry

Bappa Bhalsing bappabhalsing at yahoo.com
Tue Sep 24 03:32:54 EDT 2019


Hello All,
I am trying to run following program using python and i am getting error consistently.
Please to resolve.
input_file = '.\Desktop\height-weight.csv'import pandas as pd
from pandas import DataFrame as df
df = pd.read_csv(input_file)df.head()
o/p is OK
df('height') = df['Height(inches)'].map(lambda inches: round(inches * 0.83322 , 2))df.head()
getting following errorFile "<ipython-input-9-2a96b594216d>", line 1
    df('height') = df['Height(inches)'].map(lambda inches: round(inches * 0.83322 , 2)),
                                                                                        ^
SyntaxError: can't assign to function call



Regards,
Bappa




More information about the BangPypers mailing list