Skip to content

Instantly share code, notes, and snippets.

@llimllib
Created February 27, 2017 15:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save llimllib/385230f38c3f9b70c3e46158e6029f2a to your computer and use it in GitHub Desktop.
Save llimllib/385230f38c3f9b70c3e46158e6029f2a to your computer and use it in GitHub Desktop.
In [9]: df = pandas.DataFrame(np.random.randint(100, size=(10,1)), columns=['y'])
In [10]: df
Out[10]:
y
0 13
1 3
2 3
3 29
4 24
5 85
6 49
7 9
8 43
9 64
In [11]: df['y'] = np.log(df['y'])
In [12]: df
Out[12]:
y
0 2.564949
1 1.098612
2 1.098612
3 3.367296
4 3.178054
5 4.442651
6 3.891820
7 2.197225
8 3.761200
9 4.158883
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment