Home>

Always I am indebted.

We manage the EC site and give each person in charge the authority to change the price.
I want to make a graph of the price transition of each product, and I extract the price twice a day at any time.

If i make a table for each product and make a column of acquisition time and price in the table
Currently, there are about 2000 products, so we end up making 2000 tables.
If you're dealing with large amounts of data hourly, how is it best to create a table?

Finally I output the graph with python,
As an image, the graph of stock price changes is not a candlestick graph
I plan to create something that looks like a line graph.

Currently managed by CSV
The product code, acquisition time, and price are managed in one file.
Since I change the file each time, I create two files each day.

Thanks for your advice.

  • Answer # 1

    ・ Prepare a table with the product code and product name. PRIMARY KEY is the product code.

    ・ Prepare a table with product code, time zone (DaTETIME type), and price. PRIMARY KEY is the product code and time zone (DaTETIME type).