Pseudocode or resources to create tables and graphs using Python and Postgresql [closed]

General Tech Learning Aids/Tools 2 years ago

0 1 0 0 0 tuteeHUB earn credit +10 pts

5 Star Rating 1 Rating

Posted on 16 Aug 2022, this text provides information on Learning Aids/Tools related to General Tech. Please note that while accuracy is prioritized, the data presented might not be entirely correct or up-to-date. This information is offered for general knowledge and informational purposes only, and should not be considered as a substitute for professional advice.

Take Quiz To Earn Credits!

Turn Your Knowledge into Earnings.

tuteehub_quiz

Answers (1)

Post Answer
profilepic.png
manpreet Tuteehub forum best answer Best Answer 2 years ago

 

I am looking for a recommendations (and possible pseudocode) on either the proper process to follow to get started on a project or a direction on resources where I can go to learn more.

I am new to Python and have a need to take queries from a database and convert them to tables and graphs either online or in print.

Requirements:

  • The code must be in Python
  • I need to connect the code to a PostgreSQL database
  • Data from the queries must be aggregated (grouped by), cased and counted (preferably outside of the database so generic queries are reusable)
  • Final products must be presented in graphs and tables

I believe what I need to do is:

  1. Connect to the database using an adaptor such as "Psychopg" (this is done)
  2. Pass connection data and queries to the Postgres database (this is done)
  3. Manipulate and present the data using a library or module?(this is where I am stuck - see below)

Writing loops etc. to iterate through all the queries seems like it would be grossly inefficient. From what I have read searching online through sites such as datacamp.org and the official library documentation, it looks like what I need to do is use a library such as Pandas, put the results into a dataframe then use another library to "Plot" the results.

I was wondering if anyone could tell me if I am on the right track and guide me towards any additional libraries that may help or any examples that may exist online I could look at to "test" and aid in the learning process.

No matter what stage you're at in your education or career, TuteeHub will help you reach the next level that you're aiming for. Simply,Choose a subject/topic and get started in self-paced practice sessions to improve your knowledge and scores.

tuteehub community

Join Our Community Today

Ready to take your education and career to the next level? Register today and join our growing community of learners and professionals.

tuteehub community