Skip to content

Instantly share code, notes, and snippets.

View rtarun's full-sized avatar

Tarun Ruchandani rtarun

View GitHub Profile
@rtarun
rtarun / useful_pandas_snippets.py
Last active June 26, 2023 20:33 — forked from bsweger/useful_pandas_snippets.md
Useful Pandas Snippets
# List unique values in a DataFrame column
pd.unique(df.column_name.ravel())
# Convert Series datatype to numeric, getting rid of any non-numeric values
df['col'] = df['col'].astype(str).convert_objects(convert_numeric=True)
# Grab DataFrame rows where column has certain values
valuelist = ['value1', 'value2', 'value3']
df = df[df.column.isin(valuelist)]
@rtarun
rtarun / .block
Created August 29, 2016 18:57 — forked from mbostock/.block
Epicyclic Gearing
license: gpl-3.0
@rtarun
rtarun / .block
Last active August 31, 2016 20:14 — forked from mbostock/.block
Force-Directed Graph
license: gpl-3.0
height: 600
@rtarun
rtarun / System Design.md
Created January 28, 2019 22:11 — forked from vasanthk/System Design.md
System Design Cheatsheet

System Design Cheatsheet

Picking the right architecture = Picking the right battles + Managing trade-offs

Basic Steps

  1. Clarify and agree on the scope of the system
  • User cases (description of sequences of events that, taken together, lead to a system doing something useful)
    • Who is going to use it?
    • How are they going to use it?