Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View drmingle's full-sized avatar

Damian Mingle drmingle

View GitHub Profile
@drmingle
drmingle / Drop Columns and Rows in Pandas.ipynb
Created December 16, 2018 11:49
Learn how to drop columns and rows in a pandas dataframe
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
title author date
Detecting Outliers
Damian Mingle
06/10/2018

Preliminaries

# Load libraries
title author date
Convert Pandas Categorical Data For SciKit-Learn
Damian Mingle
06/08/2018

Preliminaries

# Bring in libraries
title author date
Create a Sparse Matrix
Damian Mingle
06/07/2018

Preliminaries

# Bring in libraries
title author date
Transpose A Vector Or A Matrix
Damian Mingle
05/08/2018

Preliminaries

import numpy as np
title author date
Arithmetic Essentials
Damian Mingle
05/05/2018

Assign values to variables

a = 11
title author date
Applying Functions To List Items
Damian Mingle
05/05/2018

Create a list of philosophers

philosopherNames = ['Aristotle', 'Plato', 'Socrates', 'Rene Descartes', 'Albert Camus']
title author date
Apply Operations Over Items In A List
Damian Mingle
05/04/2018

The map() method

# Create a list of patients who have expired
title author date
any(), all(), max(), min(), sum()
Damian
05/04/2018

Generate Data

data = [340, 564, 250, 120, 230]
title author date
Create All Combinations of a List
Damian Mingle
05/04/2018

Preliminary

from itertools import combinations_with_replacement