Skip to content
gqlxj1987's Blog
Go back

23 great pandas code

Edit page

原文链接

Convert data frame to numpy array

df.as_matrix()

Apply a function to a data frame

This one will multiple all values in the “height” column of the data frame by 2

df["height"].apply(lambda height: 2 * height)

Edit page
Share this post on:

Previous Post
不做错
Next Post
Building reactive application with Akka