Cary Introduction to Python & Anaconda
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?
- Install your module using
conda install name-of-module
in your terminal or Anaconda Prompt - Install your module with Anaconda Navigator
- Open Anaconda Navigator
- Click Environments tab
- 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
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.
- You can use the
conda list
command with the--revisions
flag to view your conda revision history. - You can use the
conda install
command with the--revision
flag with the number that corresponds to the version you want to rollback to.
bash or Powershell 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
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.
Youtube Resources to Check Out
- Rob Mulla on YouTube for Data Science with Focus on Python
- Conference Talk: So you want to be a Python expert?
- Conference Talk: 1000x faster data manipulation: vectorizing with
pandas
andnumpy
- Conference Talk: No More Sad Pandas: Optimizing Pandas Code for Sped and Efficiency
- Conference Talk: Effective Pandas
- 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?
Sidequests
- How to work with the Terminal
- Basics of version control using Git & pushing to Github
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.