SQL Import Excel File to Table with Python Pandas

If you’re looking for a simple script to extract data from an excel file and put it in an SQL table, you’ve come to the right place. In this article, I will show you how to use python pandas and sqlalchemy to import an excel file to a SQL database (MySQL) in a free, fast and flexible manner. The same method also works for SQLite or other SQL databases, but the connection details will be different.

Continue reading “SQL Import Excel File to Table with Python Pandas”

BeautifulSoup 4 Python Web Scraping to CSV Excel File

In this tutorial we do some web scraping with Python and Beautiful Soup 4. The results are then saved to a CSV file which can be opened and analyzed in Microsoft Excel or another spreadsheet program. I show you how to select elements from the page, deal with 403 Forbidden errors by faking your user agent, and overcome cases where the website is poorly laid out for web scraping. The example used here is SocialBlade.

Continue reading “BeautifulSoup 4 Python Web Scraping to CSV Excel File”