Submitted by popcornn1 t3_ydw9wv in MachineLearning
[removed]
Submitted by popcornn1 t3_ydw9wv in MachineLearning
[removed]
Tqdm.pandas()
Why this? I have always seen people praise tqdm a lot, but I don't understand why.
It's nice to know how long something is going to take
einsum
👆
.shape
*reshape
you can't reshape without knowing the shape bro
In many interesting cases this is actually very possible, e.g. broadcasting x.reshape(1, -1) * y.reshape(-1, 1) Rarely do I need to query the shape explicitly. Mostly a squeeze/unsqueeze leads to the goal. And often one knows the structure of the data explicitly, e.g. the dimensionality of a Euclidean space. I don't want to deny the use case for .shape entirely, but I think often it can be avoided.
can't agree, for unknown shapes I use permute or x.reshape(x.shape/2, x.shape/2) etc
Import
type
.swapaxes
ipdb.set_trace()
parallel_apply.
Pandas .apply() and .to_datetime(). Pandas as a whole is a work of art!
.pipe() is another game changer, along with .assign().
I recently discovered you can pass callables to almost ANYTHING in pandas. Things like
df.assign(newcolumn= lambda df: ...
or better yet df[lambda x:....]
and df.loc[lambda x:]
.
Not necessarily a function but the njit decorator from numba.
Decorators are functions!
.where
[deleted]
[deleted]
pandas.DataFrame.query()
to_exel
exit()
apply() with lambdas
poor debugability
I like pudb with classic blue screen
Import pytorch_lightning as pl
GTKdope t1_itush41 wrote
tqdm