Skip to content

Instantly share code, notes, and snippets.

@jaklinger
Created January 26, 2018 15:49
Show Gist options
  • Save jaklinger/418a12e418e276188663b54b31c400c5 to your computer and use it in GitHub Desktop.
Save jaklinger/418a12e418e276188663b54b31c400c5 to your computer and use it in GitHub Desktop.
Gender guessing from xlsx
import gender_guesser.detector as gender
import pandas as pd
path_to_file = "~/Downloads/test_names.xlsx"
d = gender.Detector()
data = pd.read_excel(path_to_file)
for name in data["names"].values:
print(d.get_gender(name))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment