Examveda
Examveda

In Pandas, which method is used to create a new column based on conditional logic applied to existing columns?

A. melt()

B. df['new_column'] = np.where(...)

C. sort_values()

D. melt()

Answer: Option B


This Question Belongs to Data Science >> Data Analysis With Python

Join The Discussion

Related Questions on Data Analysis with Python