{"record":{"id":"8f9abd7c5ed45e16","repo":"apache/beam","slug":"append-was-removed-in-pandas-2-0","errorCode":null,"errorMessage":"append() was removed in Pandas 2.0.","messagePattern":"append\\(\\) was removed in Pandas 2\\.0\\.","errorType":"exception","errorClass":"WontImplementError","httpStatus":null,"severity":"error","filePath":"sdks/python/apache_beam/dataframe/frames.py","lineNumber":1379,"sourceCode":"  @frame_base.with_docs_from(pd.Series)\n  def keys(self):\n    return self.index\n\n  # Series.T == transpose. Both are a no-op\n  T = frame_base._elementwise_method('T', base=pd.Series)\n  transpose = frame_base._elementwise_method('transpose', base=pd.Series)\n  shape = property(\n      frame_base.wont_implement_method(\n          pd.Series, 'shape', reason=\"non-deferred-result\"))\n\n  @frame_base.with_docs_from(pd.Series, removed_method=PD_VERSION >= (2, 0))\n  @frame_base.args_to_kwargs(pd.Series, removed_method=PD_VERSION >= (2, 0))\n  @frame_base.populate_defaults(pd.Series, removed_method=PD_VERSION >= (2, 0))\n  def append(self, to_append, ignore_index, verify_integrity, **kwargs):\n    \"\"\"``ignore_index=True`` is not supported, because it requires generating an\n    order-sensitive index.\"\"\"\n    if PD_VERSION >= (2, 0):\n      raise frame_base.WontImplementError('append() was removed in Pandas 2.0.')\n    if not isinstance(to_append, DeferredSeries):\n      raise frame_base.WontImplementError(\n          \"append() only accepts DeferredSeries instances, received \" +\n          str(type(to_append)))\n    if ignore_index:\n      raise frame_base.WontImplementError(\n          \"append(ignore_index=True) is order sensitive because it requires \"\n          \"generating a new index based on the order of the data.\",\n          reason=\"order-sensitive\")\n\n    if verify_integrity:\n      # We can verify the index is non-unique within index partitioned data.\n      requires = partitionings.Index()\n    else:\n      requires = partitionings.Arbitrary()\n\n    return frame_base.DeferredFrame.wrap(\n        expressions.ComputedExpression(","sourceCodeStart":1361,"sourceCodeEnd":1397,"githubUrl":"https://github.com/apache/beam/blob/12126d8942aaf848030c478b4c6a28c6af861c66/sdks/python/apache_beam/dataframe/frames.py#L1361-L1397","documentation":"DeferredSeries.append is a deprecated wrapper: pandas removed Series.append in 2.0, so Beam's deferred implementation raises WontImplementError whenever the installed pandas is >= 2.0. The operation must be replaced with pandas.concat, which Beam DataFrames supports.","triggerScenarios":"Calling s.append(other) on a DeferredSeries while pandas >= 2.0 is installed.","commonSituations":"Upgrading pandas from 1.x to 2.x in a Beam pipeline; following pre-2.0 pandas tutorials; requirements.txt floating to pandas 2.x.","solutions":["Replace append with pd.concat: pd.concat([s, to_append]) (works in both deferred and eager pandas).","Pin pandas<2.0 only as a short-term stopgap.","Update code samples/docs that reference Series.append."],"exampleFix":"// before\ncombined = s.append(to_append)\n// after\ncombined = pd.concat([s, to_append])","handlingStrategy":"try-catch","validationCode":"import pandas as pd\nPD_VERSION = tuple(int(p) for p in pd.__version__.split('.')[:2])\nif PD_VERSION >= (2, 0) and hasattr(s, 'append'):\n    raise DeprecationWarning(\"Series.append removed in pandas 2.0; use pd.concat\")","typeGuard":null,"tryCatchPattern":"from apache_beam.dataframe import frame_base\ntry:\n    combined = s.append(to_append)\nexcept frame_base.WontImplementError:\n    combined = pd.concat([s, to_append])","preventionTips":["Replace all Series.append calls with pd.concat before upgrading to pandas 2.x.","Grep the codebase for '.append(' on Series objects during pandas upgrades.","Prefer pd.concat even on pandas 1.x so the code is version-agnostic."],"tags":["apache-beam","dataframe","pandas","deprecated","pandas-2"],"backgroundTag":"deprecated-api-usage","analyzedSha":"12126d8942aaf848030c478b4c6a28c6af861c66","analyzedAt":"2026-09-13T01:50:10.254Z","contentChangedAt":"2026-09-13T01:50:10.254Z","schemaVersion":2},"datasetVersion":"2026-09-20T03:17:13.778Z"}