{"record":{"id":"059f33c87e0d1425","repo":"apache/beam","slug":"s-s-not-supported-for-s","errorCode":null,"errorMessage":"%s=%s not supported for %s","messagePattern":"(.+?)=(.+?) not supported for (.+?)","errorType":"exception","errorClass":"NotImplementedError","httpStatus":null,"severity":"error","filePath":"sdks/python/apache_beam/dataframe/frame_base.py","lineNumber":266,"sourceCode":"        value = kwargs[key]\n      else:\n        try:\n          ix = getfullargspec(func).args.index(key)\n        except ValueError:\n          # TODO: fix for delegation?\n          continue\n        if len(args) <= ix:\n          continue\n        value = args[ix]\n      if callable(values):\n        check = values\n      elif isinstance(values, list):\n        check = lambda x, values=values: x in values\n      else:\n        check = lambda x, value=value: x == value\n\n      if not check(value):\n        raise NotImplementedError(\n            '%s=%s not supported for %s' % (key, value, name))\n    deferred_arg_indices = []\n    deferred_arg_exprs = []\n    constant_args = [None] * len(args)\n    from apache_beam.dataframe.frames import _DeferredIndex\n    for ix, arg in enumerate(args):\n      if isinstance(arg, DeferredBase):\n        deferred_arg_indices.append(ix)\n        deferred_arg_exprs.append(arg._expr)\n      elif isinstance(arg, _DeferredIndex):\n        # TODO(robertwb): Consider letting indices pass through as indices.\n        # This would require updating the partitioning code, as indices don't\n        # have indices.\n        deferred_arg_indices.append(ix)\n        deferred_arg_exprs.append(\n            expressions.ComputedExpression(\n                'index_as_series',\n                lambda ix: ix.index.to_series(),  # yapf break","sourceCodeStart":248,"sourceCodeEnd":284,"githubUrl":"https://github.com/apache/beam/blob/12126d8942aaf848030c478b4c6a28c6af861c66/sdks/python/apache_beam/dataframe/frame_base.py#L248-L284","documentation":"This validation wrapper checks every (key, value) kwarg of a pandas API function against a whitelist of supported values before dispatching to the Beam implementation. If a kwarg's value is not in the supported set, it raises NotImplementedError, since the Beam DataFrame API implements only a subset of pandas parameters.","triggerScenarios":"Calling a supported pandas-like method with an unsupported keyword value, e.g. df.sort_values(..., kind='mergesort'), df.nunique(dropna=False), df.quantile(interpolation='nearest'), or df.duplicated(keep='last') where that value isn't implemented.","commonSituations":"Copy-pasting pandas code into a Beam dataframe pipeline without pruning exotic kwargs; parameters whose default is supported but non-default values are not; pandas version drift introducing new kwarg values the Beam shim doesn't recognize.","solutions":["Remove or change the unsupported kwarg to a supported/default value.","Implement the behavior manually in a map/DoFn or after converting the data to a concrete pandas DataFrame outside the pipeline.","Check the Beam DataFrame API capability summary to see which kwargs are supported per method."],"exampleFix":"// before\ndf2 = df.sort_values('col', kind='mergesort')\n// after\ndf2 = df.sort_values('col')  # only default kind supported","handlingStrategy":"validation","validationCode":"SUPPORTED = {'kind': {'quicksort'}, 'dropna': {True}}\nif key in SUPPORTED and value not in SUPPORTED[key]:\n    raise NotImplementedError(f'{key}={value} not supported')","typeGuard":"def kwarg_supported(key: str, value) -> bool:\n    supported = {'kind': {'quicksort'}, 'interpolation': {'linear'}}\n    return key not in supported or value in supported[key]","tryCatchPattern":"try:\n    out = df.sort_values('col', kind='mergesort')\nexcept NotImplementedError:\n    out = df.sort_values('col')","preventionTips":["Consult the Beam DataFrame API capability summary before using non-default kwargs.","Drop exotic kwargs when porting pandas code; add behavior manually afterwards if needed.","Pin pandas and Beam versions together so signatures stay aligned."],"tags":["python","apache-beam","dataframe-api","not-implemented"],"backgroundTag":"unsupported-operation","analyzedSha":"12126d8942aaf848030c478b4c6a28c6af861c66","analyzedAt":"2026-09-13T01:50:10.254Z","contentChangedAt":"2026-09-13T01:50:10.254Z","schemaVersion":2},"datasetVersion":"2026-09-14T16:17:12.679Z"}