Automating Your Data Science Tasks In Python (importing CSV files to database AUTOMATION TUTORIAL)
This is part 2 on automating the import of CSV files to a database - a common data science task . In this video, we'll take our python script from part 1, which manually imports a CSV/Excel file to a postgres database, and completely automate the script so that it can import multiple files without the need to edit the code. You'd essentially be saving hours of work.
Importing CSV files to a database is a common task needed for data science and analytics and it can be done completely with python using pandas dataframes, numpy, os library, and the posgres database wrapper psycopg2.
This video focuses on automation. If you're interested in build a script to import files to a database, check out the first video in our series: https://youtu.be/wqBFgaMgFQA.
Topics Covered:
- Automatically identifying your CSVs and handling multiple files using for loops, bash commands, and the os library
- Automatically cleaning the table name and column headers using methods like replace() and lower() using format() and %s variables
- Automatically converting your pandas dataframe to a CSV file using for loops and dictionaries
- Automatically creating multiple database tables and importing your data to a postgres database on Amazon Web Services (AWS) in python
______________________________________________________________________
Resources:
- How to setup Anaconda: https://docs.anaconda.com/anaconda/install/
- How to install psygopg2: https://anaconda.org/anaconda/psycopg2
? Subscribe to my channel: https://bit.ly/2GsFxmA
? Practice real data science interview questions: https://platform.stratascratch.com/coding?utm_source=youtube&utm_medium=click&utm_campaign=YT+description+link
______________________________________________________________________
Timestamps:
Intro: (0:00)
Identifying CSVs automatically: (2:20)
Automatically making a new directory and moving files: (6:55)
Converting CSV files to pandas dataframes: (13:13)
Automating the cleaning of table names and headers: (18:17)
Automatically connect to database and import files: (25:17)
______________________________________________________________________
Contact:
If you have any questions, comments, or feedback, please leave them here!
Feel free to also email me at [email protected]
______________________________________________________________________
Что делает видео по-настоящему запоминающимся? Наверное, та самая атмосфера, которая заставляет забыть о времени. Когда вы заходите на RUVIDEO, чтобы посмотреть онлайн «Automating Your Data Science Tasks In Python (importing CSV files to database AUTOMATION TUTORIAL)», вы рассчитываете на нечто большее, чем просто загрузку плеера. И мы это понимаем. Контент такого уровня заслуживает того, чтобы его смотрели в HD 1080, без дрожания картинки и бесконечного буферизации.
Честно говоря, Rutube сегодня — это кладезь уникальных находок, которые часто теряются в общем шуме. Мы же вытаскиваем на поверхность самое интересное. Будь то динамичный экшн, глубокий разбор темы от любимого автора или просто уютное видео для настроения — всё это доступно здесь бесплатно и без лишних формальностей. Никаких «заполните анкету, чтобы продолжить». Только вы, ваш экран и качественный поток.
Если вас зацепило это видео, не забудьте взглянуть на похожие материалы в блоке справа. Мы откалибровали наши алгоритмы так, чтобы они подбирали контент не просто «по тегам», а по настроению и смыслу. Ведь в конечном итоге, онлайн-кинотеатр — это не склад файлов, а место, где каждый вечер можно найти свою историю. Приятного вам отдыха на RUVIDEO!
Видео взято из открытых источников Rutube. Если вы правообладатель, обратитесь к первоисточнику.