'Pandas drop column in place and return it

This seems clunky:

col = df['col']
df.drop(columns=['col'], inplace=True)

Is there a way to drop a columns and return it on the same line?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source