Deleting columns

The del command can be used to delete a single column as shown in the following code:

In [67]: del memberDF["Height"]
In [68]: memberDF

The following is the output:

Instead of del, the pop method can be used, just like in dictionaries:

In [65]: height2 = memberDF.pop("Height2")
In [66]: memberDF

The following is the output:

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset