oldoc63 / learningDS

Learning DS with Codecademy and Books
0 stars 0 forks source link

Working with multiple DataFrames #386

Open oldoc63 opened 1 year ago

oldoc63 commented 1 year ago

In order to efficiently store data, we often spread related information across multiple tables.

For instance, imagine that we own an e-commerce business and we want to track the products that have been ordered from our website.

We could have one table with all of the following information:

order_id
customer_id
customer_name
customer_address
customer_phone_number
product_id
product_description
product_price
quantity
timestamp

However, a lot of this information would be repeated. If the same customer makes multiples orders, that customer's name, address, and phone number will be reported multiple times. If the same product is ordered by multiple customers, then the product price and description would be repeated. This will make our orders table big and unmanageable.

So instead, we can split our data into three tables: