{"record":{"id":"550852324616a22a","repo":"pandas-dev/pandas","slug":"ambiguous-is-not-supported","errorCode":null,"errorMessage":"ambiguous is not supported.","messagePattern":"ambiguous is not supported\\.","errorType":"exception","errorClass":"NotImplementedError","httpStatus":null,"severity":"error","filePath":"pandas/core/arrays/arrow/array.py","lineNumber":4200,"sourceCode":"        return self.dtype.pyarrow_dtype.unit\n\n    def _dt_normalize(self) -> Self:\n        result = pc.floor_temporal(self._pa_array, 1, \"day\")\n        return self._from_pyarrow_array(result)\n\n    def _dt_strftime(self, format: str) -> Self:\n        result = pc.strftime(self._pa_array, format=format)\n        return self._from_pyarrow_array(result)\n\n    def _round_temporally(\n        self,\n        method: Literal[\"ceil\", \"floor\", \"round\"],\n        freq,\n        ambiguous: TimeAmbiguous = \"raise\",\n        nonexistent: TimeNonexistent = \"raise\",\n    ) -> Self:\n        if ambiguous != \"raise\":\n            raise NotImplementedError(\"ambiguous is not supported.\")\n        if nonexistent != \"raise\":\n            raise NotImplementedError(\"nonexistent is not supported.\")\n        offset = to_offset(freq)\n        if offset is None:\n            raise ValueError(f\"Must specify a valid frequency: {freq}\")\n        pa_supported_unit = {\n            \"Y\": \"year\",\n            \"YS\": \"year\",\n            \"Q\": \"quarter\",\n            \"QS\": \"quarter\",\n            \"M\": \"month\",\n            \"MS\": \"month\",\n            \"W\": \"week\",\n            \"D\": \"day\",\n            \"h\": \"hour\",\n            \"min\": \"minute\",\n            \"s\": \"second\",\n            \"ms\": \"millisecond\",","sourceCodeStart":4182,"sourceCodeEnd":4218,"githubUrl":"https://github.com/pandas-dev/pandas/blob/3b7651241d4da534b3559b60ef128e1c34f54116/pandas/core/arrays/arrow/array.py#L4182-L4218","documentation":"Raised by ArrowExtensionArray._round_temporally (the shared engine behind `.dt.ceil/.dt.floor/.dt.round`) when the `ambiguous` argument is anything other than the default 'raise'. PyArrow's `ceil_temporal/floor_temporal/round_temporal` have no notion of DST-ambiguous-time resolution, so pandas cannot honor 'infer', bool arrays, or 'NaT' for these rounding operations.","triggerScenarios":"Calling `ser.dt.floor('h', ambiguous='infer')` (or any non-'raise' ambiguous value) on a tz-aware timestamp[pyarrow] Series that crosses a DST boundary where rounding could land in an ambiguous time.","commonSituations":"Copying tz_localize kwargs (`ambiguous=...`) into a rounding call; assuming the rounding API mirrors localization's argument surface.","solutions":["Omit `ambiguous` (leave it 'raise') — the operation will itself raise if it genuinely hits an ambiguous time, which is the safe default.","If you must disambiguate, tz_localize the result yourself or drop to object/tz-aware datetime64[ns] handling where ambiguous is honored."],"exampleFix":"# before\nser.dt.floor('h', ambiguous='infer')\n# after\nser.dt.floor('h')","handlingStrategy":"validation","validationCode":"if ambiguous != 'raise':\n    raise ValueError(\"ambiguous is unsupported on arrow rounding; leave default\")\nser.dt.floor('h')","typeGuard":"def arrow_round_accepts_ambiguous(ambiguous) -> bool:\n    return ambiguous == 'raise'","tryCatchPattern":"try:\n    out = ser.dt.floor(freq, ambiguous=ambiguous)\nexcept NotImplementedError as e:\n    if \"ambiguous is not supported\" in str(e):\n        out = ser.dt.floor(freq)   # fall back to default 'raise'\n    else:\n        raise","preventionTips":["Do not pass ambiguous= to dt.ceil/floor/round on arrow timestamps","Resolve DST ambiguity via tz_localize, not rounding"],"tags":["pyarrow","datetime-accessor","timezone","dst","not-implemented","arrow-extension"],"backgroundTag":null,"analyzedSha":"3b7651241d4da534b3559b60ef128e1c34f54116","analyzedAt":"2026-08-11T22:10:44.015Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}