Skip to content

Instantly share code, notes, and snippets.

View CaptainAshis's full-sized avatar
☺️
Developing intuition of Algorithms by coding it !!!

Ashis Kumar Panda CaptainAshis

☺️
Developing intuition of Algorithms by coding it !!!
View GitHub Profile
@fomightez
fomightez / useful_pandas_snippets.py
Last active April 19, 2024 18:25 — forked from bsweger/useful_pandas_snippets.md
Useful Pandas Snippets
# List unique values in a DataFrame column
df['Column Name'].unique()
# To extract a specific column (subset the dataframe), you can use [ ] (brackets) or attribute notation.
df.height
df['height']
# are same thing!!! (from http://www.stephaniehicks.com/learnPython/pages/pandas.html
# -or-
# http://www.datacarpentry.org/python-ecology-lesson/02-index-slice-subset/)