Pandas
A quick reference guide for working with Pandas — covering data loading, querying, filtering, sorting, and more.
Vagrant is a tool for building and managing portable development environments using virtual machines. Here are some things to keep in mind:
# Show the status of all boxes
vagrant status
# Shut down a running box
vagrant halt
The init command initializes a new Vagrant environment and creates a Vagrantfile in the current directory.
vagrant init centos/7
Starts and provisions the Vagrant box:
vagrant up
Opens an SSH session into the box. Vagrant handles the SSH keys automatically.
vagrant ssh
Saves a snapshot of the current state, allowing you to roll back later:
vagrant snapshot save <option> <vm-name> <name>
# List all locally installed boxes
vagrant box list
The Vagrantfile defines your virtual machine’s configuration. Here is a typical example:
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
# Base box image
config.vm.box = "centos/6"
# Private network with a static IP
config.vm.network :private_network, ip: "192.168.58.111"
# Shared folder between host and guest
config.vm.synced_folder "../data", '/vagrant_data'
# Hardware configuration
config.vm.provider :virtualbox do |vb|
vb.memory = "1024"
end
# Provisioning script that runs on first boot
config.vm.provision "shell", inline: <<-SHELL
apt-get update
apt-get install -y apache2
SHELL
end
After making changes to the Vagrantfile, apply them with:
vagrant reload
A quick reference guide for working with Pandas — covering data loading, querying, filtering, sorting, and more.
A short video capturing some of my favorite moments from university and beyond.