Skip to content

Commit bd1627a

Browse files
author
minjk-bl
committed
Edit fillna to get first element of Series which mode() returns
1 parent cde3b3e commit bd1627a

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

visualpython/js/m_apps/Frame.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3620,7 +3620,12 @@ define([
36203620
code.appendFormat(", limit={0}", content['limit']);
36213621
}
36223622
} else {
3623-
code.appendFormat("{0}.{1}()", subsetObjStr, content['method']);
3623+
if (content['method'] === 'mode') {
3624+
// get mode()'s first element (mode returns Series)
3625+
code.appendFormat("{0}.{1}()[0]", subsetObjStr, content['method']);
3626+
} else {
3627+
code.appendFormat("{0}.{1}()", subsetObjStr, content['method']);
3628+
}
36243629
}
36253630
code.append(')');
36263631
break;

0 commit comments

Comments
 (0)