How to get a simple python function into a web app

Viewed 47

I created a simple python function with Jupyter Notebook as follows:

data = {'Names' : ['Bob','Ann','Max','Ron','Fin','Eric']}
df = pd.DataFrame(data)

def name():
    print(df.Names.sample(1).iloc[0])

Calling this function prints a random name from my DataFrame:

name()
# Ann

Now I would like to create a web app with this function in order to share a link with others so that they can use my function. A simple button for users to get a random name will be enough.

What's the most efficient way to achieve this for someone like me with no experience in HMTL, Java or other programming languages?

1 Answers

If you want to continue working in Python, you could try Flask

Related