Skip to content

Instantly share code, notes, and snippets.

@farach
Last active April 25, 2022 21:08
Show Gist options
  • Save farach/8d66687c20e6335e34dc45463c903b1b to your computer and use it in GitHub Desktop.
Save farach/8d66687c20e6335e34dc45463c903b1b to your computer and use it in GitHub Desktop.
import pandas as pd
def pep_talk ():
pep_csv = pd.read_csv(
"https://raw.githubusercontent.com/farach/pep/main/pep_talk.csv",
encoding = 'unicode_escape'
)
pepText = list(
map(
lambda x : pep_csv[[x]]
.sample(n=1, ignore_index = True)
.to_string(index = False, header = False),
['p1', 'p2', 'p3', 'p4']
)
)
print(' '.join(pepText))
pep_talk()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment