MCPcopy Create free account
hub / github.com/pydata/xarray / _get_annual_rule

Method _get_annual_rule

xarray/coding/frequencies.py:182–189  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

180 return None
181
182 def _get_annual_rule(self):
183 if len(self.year_deltas) > 1:
184 return None
185
186 if len(np.unique(self.index.month)) > 1:
187 return None
188
189 return {"cs": "YS", "ce": "YE"}.get(month_anchor_check(self.index))
190
191 def _get_quartely_rule(self):
192 if len(self.month_deltas) > 1:

Callers 1

_infer_daily_ruleMethod · 0.95

Calls 2

month_anchor_checkFunction · 0.85
getMethod · 0.45

Tested by

no test coverage detected