{"record":{"id":"354843dffc50a474","repo":"dotnet/machinelearning","slug":"value","errorCode":null,"errorMessage":"value","messagePattern":"value","errorType":"exception","errorClass":"ArgumentException","httpStatus":null,"severity":"error","filePath":"src/Microsoft.Data.Analysis/DataFrameColumns/ArrowStringDataFrameColumn.cs","lineNumber":528,"sourceCode":"                    else\n                    {\n                        nullIndices.Add(i);\n                    }\n                }\n                return multimap as Dictionary<TKey, ICollection<long>>;\n            }\n            else\n            {\n                throw new NotSupportedException(nameof(TKey));\n            }\n        }\n\n        /// <inheritdoc/>\n        public ArrowStringDataFrameColumn FillNulls(string value, bool inPlace = false)\n        {\n            if (value == null)\n            {\n                throw new ArgumentException(nameof(value));\n            }\n            if (inPlace)\n            {\n                /* For now throw an exception if inPlace = true. Need to investigate if Apache Arrow\n                 * format supports filling nulls for variable length arrays\n                 */\n                throw new NotSupportedException();\n            }\n\n            ArrowStringDataFrameColumn ret = new ArrowStringDataFrameColumn(Name);\n            for (long i = 0; i < Length; i++)\n            {\n                ret.Append(IsValid(i) ? GetBytes(i) : Encoding.UTF8.GetBytes(value));\n            }\n            return ret;\n        }\n\n        protected override DataFrameColumn FillNullsImplementation(object value, bool inPlace)","sourceCodeStart":510,"sourceCodeEnd":546,"githubUrl":"https://github.com/dotnet/machinelearning/blob/7b76e69cf964daeca3f1377af6bc5543284d56c6/src/Microsoft.Data.Analysis/DataFrameColumns/ArrowStringDataFrameColumn.cs#L510-L546","documentation":"FillNulls requires a non-null fill value: it throws ArgumentException(nameof(value)) — message is 'value' — when value == null. Since the whole purpose is replacing null strings, a null replacement string is contradictory, so the library rejects it up front.","triggerScenarios":"Calling column.FillNulls(null, inPlace) — literal null passed as the fill string.","commonSituations":"Variable holding the fill value is null because config/parse produced null; developer assumes null means 'remove nulls' rather than fill.","solutions":["Pass an actual string, e.g. \"\" or a sentinel like \"N/A\".","If the goal is dropping null rows instead, use Filter(IsValid-based boolean column) or DropNulls on the DataFrame.","Check the fill value for null before calling."],"exampleFix":"// before\ncol.FillNulls(null);\n// after\ncol.FillNulls(string.Empty);","handlingStrategy":"validation","validationCode":"if (fillValue == null) fillValue = string.Empty; // or throw with a clear message\ncol.FillNulls(fillValue);","typeGuard":null,"tryCatchPattern":"try { col.FillNulls(value); }\ncatch (ArgumentException ex) when (ex.ParamName == \"value\") { col.FillNulls(string.Empty); }","preventionTips":["Ensure the fill value is initialized before calling FillNulls","Use string.Empty or an explicit sentinel for empty fills","If you want nulls removed, use DataFrame null/drop APIs instead of a null fill"],"tags":["dotnet","dataframe","null-argument"],"backgroundTag":"null-argument","analyzedSha":"7b76e69cf964daeca3f1377af6bc5543284d56c6","analyzedAt":"2026-09-11T12:35:38.930Z","contentChangedAt":"2026-09-11T12:35:38.930Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}