converting multiple functions to a single function in Python 3 : <p>I have been using the wikipedia API to create some code that trnslates outlinks of wikipedia pages across languages back to english and then creates a data frame with the information. I have all of the code working except it's in multiple cells. My advisor wants to have all of this as a single function so I basically only have to input a page title and get all of this information back. I have been incredibly unsucessful in getting any code to work when I try to nest functions. </p>

<p>Here is a link to my code:</p>

<p><a href="https://github.com/empo0270/Interlanguage-links-Wiki/blob/master/translation%20function.ipynb" rel="nofollow noreferrer">https://github.com/empo0270/Interlanguage-links-Wiki/blob/master/translation%20function.ipynb</a></p>

<p>Is there anyway to sit this mess in a single function without having to overly chop and redo all of the code structure?</p>
