Skip to content

Instantly share code, notes, and snippets.

@spepechen
Last active December 3, 2019 03:45
Show Gist options
  • Save spepechen/3b0cd510627d25e39c571b67f7072f3e to your computer and use it in GitHub Desktop.
Save spepechen/3b0cd510627d25e39c571b67f7072f3e to your computer and use it in GitHub Desktop.
Modularising some of my workflow after hanging out with pandas for quite some time
# helper func
def hi_frame(frame):
print('Nice meeting you!╰( ´・ω・)つ──☆✿✿✿✿✿✿')
print('A little bit abt me, I am...\n')
print('{row} rows X {col} columns'.format(row=frame.shape[0], col=frame.shape[1]))
print('==================================')
print(frame.dtypes)
return frame.head(5)
def hi_frames(frame, frame2):
print('{row} rows X {col} columns'.format(row=frame.shape[0], col=frame.shape[1]))
print('{row} rows X {col} columns'.format(row=frame2.shape[0], col=frame2.shape[1]))
def hi_versions():
print('matplotlib ── {v}'.format(v=matplotlib.__version__))
print('numpy ── {v}'.format(v=np.version.version))
print('pandas ── {v}'.format(v=pd.__version__))
print('seaborn ── {v}'.format(v=sns.__version__))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment