{"record":{"id":"444ad5d11eb251f3","repo":"pathwaycom/pathway","slug":"statistical-diff-invalid-column-reference-for-t-444ad5","errorCode":null,"errorMessage":"statistical.diff(): Invalid column reference for the parameter value, found a string. Did you mean this.{value} instead of {repr(value)}?","messagePattern":"statistical\\.diff\\(\\): Invalid column reference for the parameter value, found a string\\. Did you mean this\\.(.+?) instead of (.+?)\\?","errorType":"exception","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"python/pathway/stdlib/ordered/diff.py","lineNumber":104,"sourceCode":"        timestamp = self[timestamp]\n    else:\n        if isinstance(timestamp, str):\n            raise ValueError(\n                \"statistical.diff(): Invalid column reference for the parameter timestamp,\"\n                + f\" found a string. Did you mean this.{timestamp} instead of {repr(timestamp)}?\"\n            )\n        raise ValueError(\n            \"statistical.diff(): Invalid column reference for the parameter timestamp.\"\n        )\n\n    ordered_table = self.sort(key=timestamp, instance=instance)\n\n    for value in values:\n        if isinstance(value, pw.ColumnReference):\n            value = self[value]\n        else:\n            if isinstance(value, str):\n                raise ValueError(\n                    \"statistical.diff(): Invalid column reference for the parameter value,\"\n                    + f\" found a string. Did you mean this.{value} instead of {repr(value)}?\"\n                )\n            raise ValueError(\n                \"statistical.diff(): Invalid column reference for the parameter value.\"\n            )\n\n        ordered_table += ordered_table.select(\n            diff=pw.require(\n                value\n                - pw.unwrap(self.ix(ordered_table.prev, optional=True)[value._name]),\n                value,\n                ordered_table.prev,\n            )\n        )\n\n        ordered_table = ordered_table.rename({\"diff\": \"diff_\" + value.name})\n","sourceCodeStart":86,"sourceCodeEnd":122,"githubUrl":"https://github.com/pathwaycom/pathway/blob/fa2f74a4649b7c5908690cf60137263d8d80de5f/python/pathway/stdlib/ordered/diff.py#L86-L122","documentation":"Error \"statistical.diff(): Invalid column reference for the parameter value, found a string. Did you mean this.{value} instead of {repr(value)}?\" thrown in pathwaycom/pathway.","triggerScenarios":"Thrown at python/pathway/stdlib/ordered/diff.py:104 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Pass a ColumnReference for the value parameter, e.g. this.value or <table>.value instead of a string."],"exampleFix":"pw.stdlib.statistical.diff(this.timestamp, this.value)","handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"fa2f74a4649b7c5908690cf60137263d8d80de5f","analyzedAt":"2026-08-15T01:48:17.006Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}