polars icon indicating copy to clipboard operation
polars copied to clipboard

added example for microsecond

Open romanovacca opened this issue 2 years ago • 0 comments

@stinodego

I have added this example, but I feel like the current setup of methods (where we have 2 lookalike functions) is a bit confusing and error prone.

Expr.dt.microsecond() :
Extract microseconds from underlying DateTime representation.

and

Expr.dt.microseconds() 
Extract the microseconds from a Duration type.

I think that this will lead to a lower satisfaction for people using these functions, since 1 of them runs on a datetime, while the other can only be used on duration type and the function name itself does not give information on which of the 2 does what. This will mean people have to look up the documentation every time.

What do you think?

romanovacca avatar Jan 24 '23 15:01 romanovacca