Excel sheets parsing | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Excel sheets parsing

Hey! I have one thought, which library is a best for parsing excel sheets and including it in dB in python?

6th Aug 2019, 10:27 AM
Вячеслав Светлаков
Вячеслав Светлаков - avatar
4 Answers
+ 3
You can use Pandas to import excel sheets and sqlite3 to load it to SQL
6th Aug 2019, 5:31 PM
just trying to think
just trying to think - avatar
+ 2
Вячеслав Светлаков, you are right. The SQL module now uses sqlalchemy to support different database flavors. You can pass sqlalchemy engine for a PostgreSQL database. For example: from sqlalchemy import create_engine engine = create_engine('postgresql://scott:tiger@localhost:5432/mydatabase') df.to_sql('table_name', engine)
11th Aug 2019, 7:12 AM
just trying to think
just trying to think - avatar
+ 1
Pandas is good choice, but Postgresql for example, can't get dataframe from to_sql method. And now i seek new solve for it!) You help me, i hope)
10th Aug 2019, 9:51 PM
Вячеслав Светлаков
Вячеслав Светлаков - avatar
0
First, select the column of cells that contains the raw data, then open the Data menu and choose Text To Columns. When you do, Excel launches the Convert Text To Columns Wizard. Make sure the Delimited radio button is selected, and click Next. For more check out the link https://www.cetpainfotech.com/technology/advance-excel-training
4th Oct 2019, 12:12 PM
Kritesh Anand
Kritesh Anand - avatar