{ "cells": [ { "cell_type": "code", "execution_count": 2, "metadata": {}, "outputs": [], "source": [ "import pandas as pd\n", "import csv" ] }, { "cell_type": "code", "execution_count": 9, "metadata": {}, "outputs": [], "source": [ "# Specify the path to your CSV file\n", "file_path = 'styles.csv'\n", "\n", "headers = []\n", "data = []\n", "\n", "# Open the CSV file\n", "with open(file_path, mode='r', newline='') as file:\n", " # Create a CSV reader object\n", " csv_reader = csv.reader(file)\n", " \n", " # Iterate over each row in the CSV file\n", " for row in csv_reader:\n", " # Print each row (you can replace this with any other operation you want to perform on the row)\n", " headers = row\n", " break\n", " for row in csv_reader:\n", " if len(row) != 10:\n", " pass\n", " else:\n", " data.append(row)" ] }, { "cell_type": "code", "execution_count": 10, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", " | id | \n", "gender | \n", "masterCategory | \n", "subCategory | \n", "articleType | \n", "baseColour | \n", "season | \n", "year | \n", "usage | \n", "productDisplayName | \n", "
---|---|---|---|---|---|---|---|---|---|---|
0 | \n", "15970 | \n", "Men | \n", "Apparel | \n", "Topwear | \n", "Shirts | \n", "Navy Blue | \n", "Fall | \n", "2011 | \n", "Casual | \n", "Turtle Check Men Navy Blue Shirt | \n", "
1 | \n", "39386 | \n", "Men | \n", "Apparel | \n", "Bottomwear | \n", "Jeans | \n", "Blue | \n", "Summer | \n", "2012 | \n", "Casual | \n", "Peter England Men Party Blue Jeans | \n", "
2 | \n", "59263 | \n", "Women | \n", "Accessories | \n", "Watches | \n", "Watches | \n", "Silver | \n", "Winter | \n", "2016 | \n", "Casual | \n", "Titan Women Silver Watch | \n", "
3 | \n", "21379 | \n", "Men | \n", "Apparel | \n", "Bottomwear | \n", "Track Pants | \n", "Black | \n", "Fall | \n", "2011 | \n", "Casual | \n", "Manchester United Men Solid Black Track Pants | \n", "
4 | \n", "53759 | \n", "Men | \n", "Apparel | \n", "Topwear | \n", "Tshirts | \n", "Grey | \n", "Summer | \n", "2012 | \n", "Casual | \n", "Puma Men Grey T-shirt | \n", "
... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "
44419 | \n", "17036 | \n", "Men | \n", "Footwear | \n", "Shoes | \n", "Casual Shoes | \n", "White | \n", "Summer | \n", "2013 | \n", "Casual | \n", "Gas Men Caddy Casual Shoe | \n", "
44420 | \n", "6461 | \n", "Men | \n", "Footwear | \n", "Flip Flops | \n", "Flip Flops | \n", "Red | \n", "Summer | \n", "2011 | \n", "Casual | \n", "Lotto Men's Soccer Track Flip Flop | \n", "
44421 | \n", "18842 | \n", "Men | \n", "Apparel | \n", "Topwear | \n", "Tshirts | \n", "Blue | \n", "Fall | \n", "2011 | \n", "Casual | \n", "Puma Men Graphic Stellar Blue Tshirt | \n", "
44422 | \n", "46694 | \n", "Women | \n", "Personal Care | \n", "Fragrance | \n", "Perfume and Body Mist | \n", "Blue | \n", "Spring | \n", "2017 | \n", "Casual | \n", "Rasasi Women Blue Lady Perfume | \n", "
44423 | \n", "51623 | \n", "Women | \n", "Accessories | \n", "Watches | \n", "Watches | \n", "Pink | \n", "Winter | \n", "2016 | \n", "Casual | \n", "Fossil Women Pink Dial Chronograph Watch ES3050 | \n", "
44424 rows × 10 columns
\n", "\n", " | filename | \n", "link | \n", "
---|---|---|
0 | \n", "15970.jpg | \n", "http://assets.myntassets.com/v1/images/style/p... | \n", "
1 | \n", "39386.jpg | \n", "http://assets.myntassets.com/v1/images/style/p... | \n", "
2 | \n", "59263.jpg | \n", "http://assets.myntassets.com/v1/images/style/p... | \n", "
3 | \n", "21379.jpg | \n", "http://assets.myntassets.com/v1/images/style/p... | \n", "
4 | \n", "53759.jpg | \n", "http://assets.myntassets.com/v1/images/style/p... | \n", "
... | \n", "... | \n", "... | \n", "
44441 | \n", "17036.jpg | \n", "http://assets.myntassets.com/v1/images/style/p... | \n", "
44442 | \n", "6461.jpg | \n", "http://assets.myntassets.com/v1/images/style/p... | \n", "
44443 | \n", "18842.jpg | \n", "http://assets.myntassets.com/v1/images/style/p... | \n", "
44444 | \n", "46694.jpg | \n", "http://assets.myntassets.com/v1/images/style/p... | \n", "
44445 | \n", "51623.jpg | \n", "http://assets.myntassets.com/assets/images/516... | \n", "
44446 rows × 2 columns
\n", "\n", " | index | \n", "id | \n", "gender | \n", "masterCategory | \n", "subCategory | \n", "articleType | \n", "baseColour | \n", "season | \n", "year | \n", "usage | \n", "productDisplayName | \n", "link | \n", "embedding | \n", "
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0 | \n", "0 | \n", "15970 | \n", "Men | \n", "Apparel | \n", "Topwear | \n", "Shirts | \n", "Navy Blue | \n", "Fall | \n", "2011 | \n", "Casual | \n", "Turtle Check Men Navy Blue Shirt | \n", "http://assets.myntassets.com/v1/images/style/p... | \n", "[-0.04959992691874504, 0.030256308615207672, 0... | \n", "
1 | \n", "1 | \n", "39386 | \n", "Men | \n", "Apparel | \n", "Bottomwear | \n", "Jeans | \n", "Blue | \n", "Summer | \n", "2012 | \n", "Casual | \n", "Peter England Men Party Blue Jeans | \n", "http://assets.myntassets.com/v1/images/style/p... | \n", "[-0.04374004527926445, 0.0014770406996831298, ... | \n", "
2 | \n", "2 | \n", "59263 | \n", "Women | \n", "Accessories | \n", "Watches | \n", "Watches | \n", "Silver | \n", "Winter | \n", "2016 | \n", "Casual | \n", "Titan Women Silver Watch | \n", "http://assets.myntassets.com/v1/images/style/p... | \n", "[-0.017907867208123207, -0.008326959796249866,... | \n", "
3 | \n", "3 | \n", "21379 | \n", "Men | \n", "Apparel | \n", "Bottomwear | \n", "Track Pants | \n", "Black | \n", "Fall | \n", "2011 | \n", "Casual | \n", "Manchester United Men Solid Black Track Pants | \n", "http://assets.myntassets.com/v1/images/style/p... | \n", "[-0.06801198422908783, 0.011990022845566273, 0... | \n", "
4 | \n", "4 | \n", "53759 | \n", "Men | \n", "Apparel | \n", "Topwear | \n", "Tshirts | \n", "Grey | \n", "Summer | \n", "2012 | \n", "Casual | \n", "Puma Men Grey T-shirt | \n", "http://assets.myntassets.com/v1/images/style/p... | \n", "[-0.08272361010313034, 0.017822109162807465, 0... | \n", "
... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "... | \n", "
4432 | \n", "44419 | \n", "17036 | \n", "Men | \n", "Footwear | \n", "Shoes | \n", "Casual Shoes | \n", "White | \n", "Summer | \n", "2013 | \n", "Casual | \n", "Gas Men Caddy Casual Shoe | \n", "http://assets.myntassets.com/v1/images/style/p... | \n", "[-0.062232204, -0.011351791, -0.0027062385, 0.... | \n", "
4433 | \n", "44420 | \n", "6461 | \n", "Men | \n", "Footwear | \n", "Flip Flops | \n", "Flip Flops | \n", "Red | \n", "Summer | \n", "2011 | \n", "Casual | \n", "Lotto Men's Soccer Track Flip Flop | \n", "http://assets.myntassets.com/v1/images/style/p... | \n", "[-0.06830623, 0.023115562, 0.028224507, 0.0283... | \n", "
4434 | \n", "44421 | \n", "18842 | \n", "Men | \n", "Apparel | \n", "Topwear | \n", "Tshirts | \n", "Blue | \n", "Fall | \n", "2011 | \n", "Casual | \n", "Puma Men Graphic Stellar Blue Tshirt | \n", "http://assets.myntassets.com/v1/images/style/p... | \n", "[-0.058011707, 0.022569647, 0.0293498, 0.00073... | \n", "
4435 | \n", "44422 | \n", "46694 | \n", "Women | \n", "Personal Care | \n", "Fragrance | \n", "Perfume and Body Mist | \n", "Blue | \n", "Spring | \n", "2017 | \n", "Casual | \n", "Rasasi Women Blue Lady Perfume | \n", "http://assets.myntassets.com/v1/images/style/p... | \n", "[-0.0127937365, 0.002269573, 0.016845196, -0.0... | \n", "
4436 | \n", "44423 | \n", "51623 | \n", "Women | \n", "Accessories | \n", "Watches | \n", "Watches | \n", "Pink | \n", "Winter | \n", "2016 | \n", "Casual | \n", "Fossil Women Pink Dial Chronograph Watch ES3050 | \n", "http://assets.myntassets.com/assets/images/516... | \n", "[-0.007802535, -0.030409014, -0.01775647, -0.0... | \n", "
44424 rows × 13 columns
\n", "