Please note, this is a STATIC archive of website www.w3resource.com from 19 Jul 2022, cach3.com does not collect or store any user information, there is no "phishing" involved.

Examples

In [1]:
import numpy as np
import pandas as pd
In [2]:
df = pd.DataFrame([('eagle', 'bird', 320.0),
                   ('sparrow', 'bird', 30.0),
                   ('tiger', 'mammal', 92.5),
                   ('fox','mammal', np.nan)],
                  columns=('name', 'class', 'max_speed'))
df
Out[2]:
name class max_speed
0 eagle bird 320.0
1 sparrow bird 30.0
2 tiger mammal 92.5
3 fox mammal NaN
In [3]:
df.pop('class')
Out[3]:
0      bird
1      bird
2    mammal
3    mammal
Name: class, dtype: object
In [4]:
df
Out[4]:
name max_speed
0 eagle 320.0
1 sparrow 30.0
2 tiger 92.5
3 fox NaN