Hackers and Slackers
  • About
  • Series
  • Search
  • Join
  • Donate
  • Log in
  • Subscribe
  • Latest
  • Python
  • Software
  • DevOps
  • Data Engineering
  • Architecture
  • Pandas
  • Excel
  • Data Analysis
  • REST APIs
  • SQL
  • Data Science
  • Flask
  • JavaScript
  • Code Snippet Corner
  • AWS
  • NodeJS

Code Snippet Corner

Real-world examples of Python snippets used to solve complex data problems, primarily leveraging Pandas and related libraries.
Being REALLY Lazy With Multiple Aggregations in Pandas

Being REALLY Lazy With Multiple Aggregations in Pandas

Perform multiple aggregate functions simultaneously with Pandas 0.25
Matthew Alhonte
Matthew Alhonte
Dec 9, 2019 • 3 min read
Code Snippet Corner
Splitting Columns With Pandas

Splitting Columns With Pandas

Split columns containing multiple values in your Pandas DataFrame into multiple columns, each containing a single value.
Matthew Alhonte
Matthew Alhonte
Nov 19, 2019 • 7 min read
Code Snippet Corner
Recasting Low-Cardinality Columns as Categoricals

Recasting Low-Cardinality Columns as Categoricals

Downcast strings in Pandas to their proper data-types using HDF5.
Matthew Alhonte
Matthew Alhonte
Jun 3, 2019 • 3 min read
Code Snippet Corner
Removing Duplicate Columns in Pandas

Removing Duplicate Columns in Pandas

Dealing with duplicate column names in your Pandas DataFrame.
Matthew Alhonte
Matthew Alhonte
May 28, 2019 • 3 min read
Code Snippet Corner
Downcast Numerical Data Types with Pandas

Downcast Numerical Data Types with Pandas

Using an Example Where We Downcast Numerical Columns.
Matthew Alhonte
Matthew Alhonte
Jan 28, 2019 • 5 min read
Code Snippet Corner
Using Random Forests for Feature Selection with Categorical Features

Using Random Forests for Feature Selection with Categorical Features

Python helper functions for adding feature importance, and displaying them as a single variable.
Matthew Alhonte
Matthew Alhonte
Sep 24, 2018 • 2 min read
Code Snippet Corner
Tuning Random Forests Hyperparameters: min_samples_leaf

Tuning Random Forests Hyperparameters: min_samples_leaf

Tune the min_samples_leaf parameter in for a Random Forests classifier in scikit-learn in Python
Matthew Alhonte
Matthew Alhonte
Sep 17, 2018 • 4 min read
Code Snippet Corner
Tuning Random Forests Hyperparameters: max_depth

Tuning Random Forests Hyperparameters: max_depth

Tune the max_depth parameter in for a Random Forests classifier in scikit-learn in Python
Matthew Alhonte
Matthew Alhonte
Sep 10, 2018 • 2 min read
Code Snippet Corner
Tuning Machine Learning Hyperparameters with Binary Search

Tuning Machine Learning Hyperparameters with Binary Search

Tune the n_estimators parameter in for a Random Forests classifier in scikit-learn in Python.
Matthew Alhonte
Matthew Alhonte
Sep 3, 2018 • 4 min read
Code Snippet Corner
Importing Excel Datetimes Into Pandas, Part II

Importing Excel Datetimes Into Pandas, Part II

Import dates & times from Excel .xlsx files into Pandas!
Matthew Alhonte
Matthew Alhonte
Aug 20, 2018 • 2 min read
Code Snippet Corner
Importing Excel Datetimes Into Pandas, Part I

Importing Excel Datetimes Into Pandas, Part I

Parse dates and times from Excel .xlsx correctly when using Pandas.
Matthew Alhonte
Matthew Alhonte
Aug 13, 2018 • 1 min read
Code Snippet Corner
Lazy Pandas and Dask

Lazy Pandas and Dask

Speed up data analysis by parallelizing your DataFrames.
Matthew Alhonte
Matthew Alhonte
Aug 6, 2018 • 4 min read
Pandas
All That Is Solid Melts Into Graphs

All That Is Solid Melts Into Graphs

Reshaping Pandas DataFrames with a real-life example, and graphing it with Altair.
Matthew Alhonte
Matthew Alhonte
Jul 30, 2018 • 6 min read
Code Snippet Corner
Trash Pandas: Messy, Convenient Database Operations via Pandas

Trash Pandas: Messy, Convenient Database Operations via Pandas

Using Pandas with databases wrong way, and how to clean it up with SQLAlchemy.
Matthew Alhonte
Matthew Alhonte
Jul 23, 2018 • 3 min read
Code Snippet Corner
A Dirty Way of Cleaning Data (ft. Pandas & SQL)

A Dirty Way of Cleaning Data (ft. Pandas & SQL)

Cleaning data in Pandas the dirty way.
Matthew Alhonte
Matthew Alhonte
Jul 16, 2018 • 8 min read
Code Snippet Corner
Getting Conda Environments To Play Nicely With Cron

Getting Conda Environments To Play Nicely With Cron

Set up CRON jobs to interact with Conda environments.
Matthew Alhonte
Matthew Alhonte
Jul 9, 2018 • 3 min read
Code Snippet Corner
Using Pandas and SQLAlchemy to Simplify Databases

Using Pandas and SQLAlchemy to Simplify Databases

Use SQLAlchemy with PyMySQL to make database connections easy.
Matthew Alhonte
Matthew Alhonte
Jul 3, 2018 • 6 min read
Code Snippet Corner

Tags

Python Software DevOps Architecture Data Engineering Pandas Excel Data Analysis Data Science REST APIs SQL Code Snippet Corner JavaScript Flask AWS NodeJS Google Cloud Apache Frontend MySQL Data Vis NoSQL BI ExpressJS Spark PostgreSQL GraphQL ETL Pipelines Tableau GatsbyJS Atlassian SQLAlchemy Automation Machine Learning Big Data Golang Mapbox Scraping JAMStack Data Warehouses Powerpivot PowerBI Plotly Concurrency Docker SaaS Products Django Hashicorp ReactJS Frameworks FastAPI Terraform Java

Newsletter

Join the newsletter to receive the latest updates in your inbox.

Please check your inbox and click the link to confirm your subscription.
Please enter a valid email address!
An error occurred, please try again later.

Series'

Data Analysis with Pandas 11
Build Flask Apps 11
Google Cloud Architecture 6
Learning Apache Spark 6
Mastering SQLAlchemy 4
GraphQL Tutorials 4
Welcome to SQL 4
Working with MySQL 4
Mapping Data with Mapbox 3
Python Concurrency with Asyncio 2
Web Scraping With Python 2
Getting Started with Django 2
Hackers and Slackers

Community of hackers obsessed with data science, data engineering, and analysis. Openly pushing a pro-robot agenda.

Navigation

    • About
    • Series
    • Search
    • Join
    • Donate

Series'

  • Build Flask Apps
  • Data Analysis with Pandas
  • Learning Apache Spark
  • Google Cloud Architecture
  • Create a REST API in AWS
  • GraphQL Tutorials
  • Mastering SQLAlchemy
  • Hacking Tableau Server
  • Working with MySQL
  • Welcome to SQL
  • Mapping Data with Mapbox
  • Python Concurrency with Asyncio
  • Web Scraping With Python
  • Getting Started with Django

Authors

  • Todd Birchard
  • Matthew Alhonte
  • Max Mileaf
  • Ryan Rosado
  • Graham Beckley
  • David Aquino
  • Paul Armstrong
  • Dylan Castillo
2022 Hackers and Slackers