Skip to content

Instantly share code, notes, and snippets.

@bsweger
bsweger / useful_pandas_snippets.md
Last active April 19, 2024 18:04
Useful Pandas Snippets

Useful Pandas Snippets

A personal diary of DataFrame munging over the years.

Data Types and Conversion

Convert Series datatype to numeric (will error if column has non-numeric values)
(h/t @makmanalp)

@mallocator
mallocator / git.hook.mvn_clean
Last active December 4, 2020 13:46
A pre-commit hook for git that will run maven clean test and output any failed tests as well as a summary if there was an error.
#!/bin/bash
# save the file as <git_directory>/.git/hooks/pre-commit.d/mvn_test and chmod +x
echo "Running mvn clean test for errors"
# retrieving current working directory
CWD=`pwd`
MAIN_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
# go to main project dir
@hky
hky / mongodb.md
Created May 17, 2016 21:25
#mongodb cheat sheet

MongoDB cheat sheet

Overview

Overview

MongoDB is a document database that provides high performance, high availability, and easy scalability.

  • Document Database