Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Edit fillna to get first element of Series which mode() returns
  • Loading branch information
minjk-bl
minjk-bl committed May 7, 2024
commit bd1627a81332a51a8f36ae38b6a0474a9cec9483
7 changes: 6 additions & 1 deletion visualpython/js/m_apps/Frame.js
Original file line number Diff line number Diff line change
Expand Up @@ -3620,7 +3620,12 @@ define([
code.appendFormat(", limit={0}", content['limit']);
}
} else {
code.appendFormat("{0}.{1}()", subsetObjStr, content['method']);
if (content['method'] === 'mode') {
// get mode()'s first element (mode returns Series)
code.appendFormat("{0}.{1}()[0]", subsetObjStr, content['method']);
} else {
code.appendFormat("{0}.{1}()", subsetObjStr, content['method']);
}
}
code.append(')');
break;
Expand Down