Skip to content

dark-teal-coder/ttr-py-data-analysis-pandas-gadget-sales

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Python Data Analysis of Tech Gadget Sales with Pandas

Metadata

Project

  • Title: Python Data Analysis of Tech Gadget Sales with Pandas
  • Difficulty:
    • Beginner
    • Intermediate
    • Advanced
  • Scale:
    • Small
    • Medium
    • Large

Repository Description

This repository contains a Jupyter notebook which demonstrates how to analyze tech gadget sales in the US in 2019. We use the Python Pandas and Matplotlib libraries to analyze and answer business questions about 12 months worth of sales data here. The data contains hundreds of thousands of electronics store purchases broken down by month, product type, cost, purchase address, etc.

We walk through different Pandas & Matplotlib methods below.

  • Concatenating multiple CSVs together to create a new DataFrame (pd.concat())
  • Adding columns
  • Parsing cells as strings to make new columns (.str)
  • Using the apply() method
  • Using groupby() to perform aggregate analysis
  • Plotting bar charts and lines graphs to visualize our results
  • Labeling our graphs

Installation

Python Development Tools

Python Libraries

Check if you have Python installed using the command python --version, or simply, python version, in the CLI. Git-clone the project repository from Github to the local machine. Use the command py -m pip install package_name to install the necessary Python libraries. Check out pip documentation to learn more about pip install. Check the top part of the .py script file for the list of libraries required. For example, you may need requests and beautifulsoup4 libraries if you see the following lines in the top part of the script file:

import requests
from bs4 import BeautifulSoup

If pip fails to locate the relevant packages, you may find it at Python Package Index (PyPI). Use python file_name.py to run the script in a CLI. Or, use an IDE, such as VS Code, to run the script. There will usually be a [Run] button in the top right corner of the opened script file.

Instructions

To Get All the Files in the Current Repository

  • Click [Code]
  • Click [Download ZIP]
  • Extract the .zip file to the working directory

To Fork a Repo and Clone it Locally

To access all of the files, fork this repo and then clone it locally.

For more information, please refer to Fork a repo.

To Install Python Pandas Library

  • Open a command-line interface
  • Type pip install pandas
  • Press [Enter]

For more information, please refer to Installing Pandas.

To Install Jupyter Notebook

Prerequisite: Python1

  • Run pip3 install --upgrade pip to upgrade to the latest version of pip
  • Run pip3 install jupyter to install Jupyter Notebook

For more information, please refer to Installing the Classic Jupyter Notebook Interface.

Credits

Contributors

References

 

1st Completion Date: Dec 20, 2022

Footnotes

  1. Python is a requirement for installing the Jupyter Notebook.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published