Created
September 12, 2022 20:46
-
-
Save keitazoumana/2ea1f5d53a125655e8806b73392e7e6c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Import pandas library | |
import pandas as pd | |
# Read my dataset | |
candidates_df = pd.read_csv("./data/candidates_data.csv") | |
# Check the data columns' types | |
candidates_df.dtypes | |
# Only select columns of type "object" & "datetime" | |
candidates_df.select_dtypes(include = ["object", "datetime64"]) | |
# Exclude columns of type "datetime" & "int" | |
candidates_df.select_dtypes(exclude = ["int64", "datetime64"]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment