Skip to content

Instantly share code, notes, and snippets.

View pwwang's full-sized avatar
🏠
Github addictive user

pwwang

🏠
Github addictive user
View GitHub Profile
@pwwang
pwwang / __fish_move_last.fish
Last active July 5, 2018 19:55
Fish cd with symbolic path kept.
# for prevd and nextd, cd -
function __fish_move_last -d "Move the last element of a directory history from src to dest"
set -l src $argv[1]
set -l dest $argv[2]
set -l size_src (count $$src)
if test $size_src = 0
# Cannot make this step
@conormm
conormm / r-to-python-data-wrangling-basics.md
Last active April 24, 2024 18:22
R to Python: Data wrangling with dplyr and pandas

R to python data wrangling snippets

The dplyr package in R makes data wrangling significantly easier. The beauty of dplyr is that, by design, the options available are limited. Specifically, a set of key verbs form the core of the package. Using these verbs you can solve a wide range of data problems effectively in a shorter timeframe. Whilse transitioning to Python I have greatly missed the ease with which I can think through and solve problems using dplyr in R. The purpose of this document is to demonstrate how to execute the key dplyr verbs when manipulating data using Python (with the pandas package).

dplyr is organised around six key verbs: