'How to convert object to int in jupyter (pandas)?

How to convert object to int in jupyter (pandas)?

dataset['Gender'] = dataset['Gender'].astype(str).astype(int)

enter image description here



Sources

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

Source: Stack Overflow

Solution Source