Open dtourillon opened 6 years ago
@dtourillon : Thanks for reporting this! Indeed, that does seem intuitive to me. "Downsampling" at the same frequency should vacuously be true I would think.
@jreback @jorisvandenbossche : Thoughts?
cc @jbrockmendel
@jorisvandenbossche yah I took a look at this, not entirely sure. I think we need to track down a more specific explanation of the docstring "if upsampling[/downsampling] is possible between source and target frequencies"
It is used in downsampling (resample
) and in timeseries plotting, so I would try to see there was could be the logic / see if you can find an example where it looks like a bug.
Eg in resampling, the case where both frequencies are equal is handled afterwards explicitly:
For this snipped, I would say that it the method should not return True for equal freqs (for that internal usage)
Code Sample, a copy-pastable example if possible
Problem description
When source == target, shouldn't pd._libs.tslibs.frequencies.is_subperiod(source, target) always return True?
Expected Output
Output of
pd.show_versions()