fields.pyi 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. import numpy as np
  2. from pandas._typing import npt
  3. def build_field_sarray(
  4. dtindex: npt.NDArray[np.int64], # const int64_t[:]
  5. reso: int, # NPY_DATETIMEUNIT
  6. ) -> np.ndarray: ...
  7. def month_position_check(fields, weekdays) -> str | None: ...
  8. def get_date_name_field(
  9. dtindex: npt.NDArray[np.int64], # const int64_t[:]
  10. field: str,
  11. locale: str | None = ...,
  12. reso: int = ..., # NPY_DATETIMEUNIT
  13. ) -> npt.NDArray[np.object_]: ...
  14. def get_start_end_field(
  15. dtindex: npt.NDArray[np.int64],
  16. field: str,
  17. freqstr: str | None = ...,
  18. month_kw: int = ...,
  19. reso: int = ..., # NPY_DATETIMEUNIT
  20. ) -> npt.NDArray[np.bool_]: ...
  21. def get_date_field(
  22. dtindex: npt.NDArray[np.int64], # const int64_t[:]
  23. field: str,
  24. reso: int = ..., # NPY_DATETIMEUNIT
  25. ) -> npt.NDArray[np.int32]: ...
  26. def get_timedelta_field(
  27. tdindex: npt.NDArray[np.int64], # const int64_t[:]
  28. field: str,
  29. reso: int = ..., # NPY_DATETIMEUNIT
  30. ) -> npt.NDArray[np.int32]: ...
  31. def get_timedelta_days(
  32. tdindex: npt.NDArray[np.int64], # const int64_t[:]
  33. reso: int = ..., # NPY_DATETIMEUNIT
  34. ) -> npt.NDArray[np.int64]: ...
  35. def isleapyear_arr(
  36. years: np.ndarray,
  37. ) -> npt.NDArray[np.bool_]: ...
  38. def build_isocalendar_sarray(
  39. dtindex: npt.NDArray[np.int64], # const int64_t[:]
  40. reso: int, # NPY_DATETIMEUNIT
  41. ) -> np.ndarray: ...
  42. def _get_locale_names(name_type: str, locale: str | None = ...): ...
  43. class RoundTo:
  44. @property
  45. def MINUS_INFTY(self) -> int: ...
  46. @property
  47. def PLUS_INFTY(self) -> int: ...
  48. @property
  49. def NEAREST_HALF_EVEN(self) -> int: ...
  50. @property
  51. def NEAREST_HALF_PLUS_INFTY(self) -> int: ...
  52. @property
  53. def NEAREST_HALF_MINUS_INFTY(self) -> int: ...
  54. def round_nsint64(
  55. values: npt.NDArray[np.int64],
  56. mode: RoundTo,
  57. nanos: int,
  58. ) -> npt.NDArray[np.int64]: ...