0

I am new to python, but not new to programming. So there may be a lot of knowledge I have yet to master. Or learn the best way to solve a problem.

I have a project, that I have gotten to using fake data generated, to display in an html table.

But to manipulate for various reports I want to do on it. Normally I would insert all the data to a mysql table, and then run a query against that. None of this data is something I need to keep for very long, just long enough to run a variety of reports I want to create.

I have two ways to get data, one way which already works creates an array of fake data with correct column headers.

The other way which I haven't started working on yet, will import a csv file.

I want to run queries against the data regardless of the source.

Is the only way to do this, via inserting data, and then querying that data?

Or is there another way, where I import the csv or fake data into an array, and run the queries on that without being forced to save or import the data?

That is the core of my question.

I apologize for my lack of knowledge of python.

Thank you for your time.

crosenblum
  • 1,869
  • 5
  • 34
  • 57
  • 1
    If you don't need to save the data you can use pandas instead of a database. – Barmar Mar 19 '23 at 03:59
  • If you don't know pandas and want to use SQL language to query it, see https://stackoverflow.com/questions/45865608/executing-an-sql-query-over-a-pandas-dataset – Barmar Mar 19 '23 at 04:01

0 Answers0