Last active
September 1, 2018 01:22
-
-
Save bhishanpdl/203a6c0cd2bd4f20b64a1583cb8193e9 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pandas as pd | |
import string | |
df = pd.DataFrame({'c0':range(1,10), 'c1': list(string.ascii_letters[0:9])}) | |
df2 = df.iloc[[0, -1]] | |
# first and last 10 | |
df = pd.concat([df.head(10), df.tail(10)]) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment