Skip to content

gregorywaynepower/cary-python-introduction

Repository files navigation

Cary Introduction to Python & Anaconda

Quarto Website Nbviewer Open In Colab OpenSSF Best Practices

Navigating the File Tree in this Repository

Installing This Repository's Depencies using conda-lock.yml or environment.yml Files

You can install project dependencies either using out-of-the-box conda CLI commands, or installing conda-lock to ensure dependencies are solved no matter the platform you are on.

conda install -c conda-forge conda-lock
conda-lock install --name name-of-your-environment conda-lock.yml
conda activate name-of-your-environment
conda env create -n name-of-your-environment --file environment.yml
conda activate name-of-your-environment

Missing an Imported Module?

  1. Install your module using conda install name-of-module in your terminal or Anaconda Prompt
  2. Install your module with Anaconda Navigator
    1. Open Anaconda Navigator
    2. Click Environments tab
    3. Select the Environment you want to install a module into

Please don't use python -m pip install name-of-module when installing packages without activating your conda environment via conda activate name-of-environment first.

Anaconda's Explanation of conda & pip if you want a more in-depth explanation.

Anaconda's Free [with Account Creation] Courses

Anaconda Ecosystem

Anaconda Navigator (GUI)

Trying to Explore Packages Not Installed?

If your list of "Not Installed" packages is blank, I recommend manually updating Anaconda Navigator.

conda (CLI)

Need to Rollback to a Previous Version of a conda?

If you are experimenting with your conda base environment and need to restore a previous version of a conda.

  1. You can use the conda list command with the --revisions flag to view your conda revision history.
  2. You can use the conda install command with the --revision flag with the number that corresponds to the version you want to rollback to.
conda list --revisions
conda install --revision N
# Replace N with the number that corresponds to the version you want to rollback to.

Trying to make conda Faster?

Python 3

Official Documentation

  1. Python.org's 'Whetting Your Appetite'
  2. Python.org's Official Python 3 Tutorial
  3. Python.org's Glossary of Terms
  4. Python.org's Style Guide for Python Code

Python Modules

polars

For in-memory analysis of tabular data and introduces the DataFrame for larger-than-memory datasets and want an API similar to pandas.

pandas

For in-memory analysis of tabular data and introduces the DataFrame

geopandas

If you need your DataFrame to be mapped or do geospatial calculations.

folium

If you need more interactivity from your generated map.

cartopy

If you need more control over your generated static map projection.

xarray

If you need your dataset to have more than two dimensions.

matplotlib

Highly configurable visualization library that other libraries build off of.

seaborn

High-level library for generating statistical graphics, especially for long data format.

plotly.express

Generate interactive graphics, with a focus on exploratory analysis with visuals.

Recommended Books

I highly recommend going through the official Python 3 tutorial first. It's a great way to get your feet wet and get a feel for the language. However, here are some books I recommend if you want to go deeper or explore certain topics.

  1. Automate the Boring Stuff with Python by Al Sweigart
  2. Data Analysis with Pandas: 2nd Edition by Stefanie Molin
  3. Data Science at the Command Line: 2nd Edition by Jeoroen Janssens

Youtube Resources to Check Out

  1. Rob Mulla on YouTube for Data Science with Focus on Python
    1. Playlist: Medallion Python Data Science Coding Videos
    2. Playlist: Working with Data in Python
  2. Conference Talk: So you want to be a Python expert?
  3. Conference Talk: 1000x faster data manipulation: vectorizing with pandas and numpy
  4. Conference Talk: No More Sad Pandas: Optimizing Pandas Code for Sped and Efficiency
  5. Conference Talk: Effective Pandas
  6. Conference Tutorial: So You Wanna Be a Pandas Expert?

Topics on the Table

  • Installing Anaconda's Package & Environment Manager conda (Command Line Interface Tool) and Anaconda-Navigator (Graphical User Interface Tool) (Best practice when it comes to dependency management for Python and R)
  • Picking an editor of your choice that supports JupyterNotebooks (Visual Studio Code or JupyterLab)
  • How do I get data into Python and get descriptive statistics? (reading files with pandas)
  • Now paint me a picture with the data. (introduction to Plotly & Holoviz Ecosystem)
  • How do I share this?
    • Binder if you want interactivity (a little more setup)
    • nbviewer if you value sharing your rendered files (less setup but not as pretty)

Sidequests

Contributing

If you have anything you want to cover, I'm open to suggestions. Feel free to checkout the contributing guidelines for ways to offer feedback and contribute. My previous experience with python covers web scraping, cleaning data, statistical analysis, and moving data into and out of databases.

About

Project to train folks on the basics of Python, Anaconda, and data analysis.

Resources

License

Security policy

Stars

Watchers

Forks