Skip to content

Instantly share code, notes, and snippets.

@AayushSameerShah
Created June 10, 2021 13:56
Show Gist options
  • Save AayushSameerShah/3029d7dd4a104b17b146f8a9b4c31c0c to your computer and use it in GitHub Desktop.
Save AayushSameerShah/3029d7dd4a104b17b146f8a9b4c31c0c to your computer and use it in GitHub Desktop.
This is how to quickly make a deck of 52 cards
series = pd.Series([], dtype= int)
for suite in ['H', 'D', 'S', 'C']:
for value, number in enumerate(['A'] + list(range(1, 11)) + ['J', 'Q', 'K']):
series = series.add(pd.Series({str(number) + suite: value + 1}), fill_value= 0)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment