Skip to content

Instantly share code, notes, and snippets.

@JohnDeJesus22
Created August 5, 2022 01:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save JohnDeJesus22/83f84d13f8ed51c3af396012d2c5f5fa to your computer and use it in GitHub Desktop.
Save JohnDeJesus22/83f84d13f8ed51c3af396012d2c5f5fa to your computer and use it in GitHub Desktop.
jb_each_year.py
# apply Jarque-Bera Test to baby_counts for each year
years = baby_names["Year of Birth"].sort_values().unique().tolist()
for year in years:
baby_year = baby_names[baby_names["Year of Birth"] == year]
jb_results = jarque_bera(baby_year["Count"])
print(f"Jarque-Bera Count Results for {year}: {jb_results}")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment