Skip to content

Glossary: pandas Beyond the Basics

assign

Also written: .assign()

A DataFrame method that adds or replaces columns and returns a new DataFrame, so it can sit in the middle of a method chain. Give it a lambda so it can use the table as it is at that point in the chain.

Where the book teaches it

Related terms

Method chainLambda