Ans:
to add a new column ‘val’ in dataframe ‘df’ we will write-
df[‘val’]=[12,23,45,43,55,12,23,43,11,29]
Here we are assigning 10 different values to ‘val’ column as df have 10 rows.
Ans:
to add a new column ‘val’ in dataframe ‘df’ we will write-
df[‘val’]=[12,23,45,43,55,12,23,43,11,29]
Here we are assigning 10 different values to ‘val’ column as df have 10 rows.