numpy2 Flashcards
1
Q
get absolute values of the column
A
np.absolute(df[‘col’]
2
Q
transform an array back after it had been log transformed
A
np.exp(arr)
3
Q
change the formatting of np arrays to 2 digits
A
np.set_printoptions(formatter={‘float’: lambda x: “{0:0.2f}”.format(x)})
4
Q
remove formatting of display
A
np.set_printoptions(formatter=None)