{ "cells": [ { "cell_type": "code", "execution_count": 5, "id": "18eacdbd", "metadata": {}, "outputs": [], "source": [ "import pandas as pd\n", "import os\n" ] }, { "cell_type": "code", "execution_count": 6, "id": "1429805a", "metadata": {}, "outputs": [], "source": [ "file_path = '../data/raw/online_retail_II.xlsx'\n" ] }, { "cell_type": "code", "execution_count": null, "id": "907ab9ac", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Loading data...\n" ] } ], "source": [ "df = pd.read_excel(file_path, sheet_name='Year 2009-2010')" ] }, { "cell_type": "markdown", "id": "0386fe66", "metadata": {}, "source": [ "# Basic Sanity Check\n" ] }, { "cell_type": "code", "execution_count": 8, "id": "0c568d7f", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Data loaded successfully!\n", "Total Rows: 525461\n", "Total Columns: 8\n" ] } ], "source": [ "print(\"Data loaded successfully!\")\n", "print(f\"Total Rows: {df.shape[0]}\")\n", "print(f\"Total Columns: {df.shape[1]}\")\n", "\n" ] }, { "cell_type": "markdown", "id": "be9a7f30", "metadata": {}, "source": [ "# Preview data" ] }, { "cell_type": "code", "execution_count": 9, "id": "b8a911f7", "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
InvoiceStockCodeDescriptionQuantityInvoiceDatePriceCustomer IDCountry
04894348504815CM CHRISTMAS GLASS BALL 20 LIGHTS122009-12-01 07:45:006.9513085.0United Kingdom
148943479323PPINK CHERRY LIGHTS122009-12-01 07:45:006.7513085.0United Kingdom
248943479323WWHITE CHERRY LIGHTS122009-12-01 07:45:006.7513085.0United Kingdom
348943422041RECORD FRAME 7\" SINGLE SIZE482009-12-01 07:45:002.1013085.0United Kingdom
448943421232STRAWBERRY CERAMIC TRINKET BOX242009-12-01 07:45:001.2513085.0United Kingdom
\n", "
" ], "text/plain": [ " Invoice StockCode Description Quantity \\\n", "0 489434 85048 15CM CHRISTMAS GLASS BALL 20 LIGHTS 12 \n", "1 489434 79323P PINK CHERRY LIGHTS 12 \n", "2 489434 79323W WHITE CHERRY LIGHTS 12 \n", "3 489434 22041 RECORD FRAME 7\" SINGLE SIZE 48 \n", "4 489434 21232 STRAWBERRY CERAMIC TRINKET BOX 24 \n", "\n", " InvoiceDate Price Customer ID Country \n", "0 2009-12-01 07:45:00 6.95 13085.0 United Kingdom \n", "1 2009-12-01 07:45:00 6.75 13085.0 United Kingdom \n", "2 2009-12-01 07:45:00 6.75 13085.0 United Kingdom \n", "3 2009-12-01 07:45:00 2.10 13085.0 United Kingdom \n", "4 2009-12-01 07:45:00 1.25 13085.0 United Kingdom " ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "\n", "display(df.head())" ] } ], "metadata": { "kernelspec": { "display_name": "base", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.11.5" } }, "nbformat": 4, "nbformat_minor": 5 }