'sql database a panda
hello someone can help me I must create a program in Python that connects to my database, read the database records and create a pivot table with Pandas with that data
Solution 1:[1]
You might be looking for pandas.read_sql
You can use con parameter to pass your database connection string.
Solution 2:[2]
Here's a link to connect SQL to Python. Depending on the database you use, library will vary. Search for your particular database to python connection.
https://www.geeksforgeeks.org/how-to-connect-python-with-sql-database/
This will give you a 5 min crash course with Pandas and how to use pivot tables.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | ashwani |
| Solution 2 | Hrishikesh Nadkarni |
