Skip to content

Instantly share code, notes, and snippets.

@westurner
Created September 14, 2012 17:08
Show Gist options
  • Save westurner/3723284 to your computer and use it in GitHub Desktop.
Save westurner/3723284 to your computer and use it in GitHub Desktop.
To Remember
from pandas import DataFrame, Series, Index
N = 1.7
index2 = Index(range(0,200))
uhh = [(n**N) for n in index2[:95]]
uhh.extend( (n**(-N)) for n in index2[95:100] )
uhh.extend( uhh )
series = Series(uhh, index=index2)
uhh2 = uhh[:95]
uhh2.extend( (uhh[-6],)*5 )
uhh2.extend( (n**N) for n in xrange(100,195) )
uhh2.extend( (uhh2[-1],)*5 )
series2 = Series(uhh2)
df = DataFrame(index=index2)
df['one'] = series
df['two'] = series2
print(df.describe())
df.plot()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment