Skip to content

Commit 9b20ffa

Browse files
authored
fix: fillNa throws an error when value is empty string
Dataframe.fillNa("") throws an error. There are few use cases when we want to fill NaN with an empty string. This feature is supported by pandas.
1 parent 2c274ee commit 9b20ffa

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/danfojs-base/core/frame.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2102,7 +2102,7 @@ export default class DataFrame extends NDframe implements DataFrameInterface {
21022102
): DataFrame | void {
21032103
let { columns, inplace } = { inplace: false, ...options }
21042104

2105-
if (!values && typeof values !== "boolean" && typeof values !== "number") {
2105+
if (!values && typeof values !== "boolean" && typeof values !== "number" && typeof values !== "string") {
21062106
throw Error('ParamError: value must be specified');
21072107
}
21082108

0 commit comments

Comments
 (0)