Skip to content

Commit de1a802

Browse files
author
minjk-bl
committed
Add more options to value_counts
1 parent bc90d2b commit de1a802

File tree

1 file changed

+34
-2
lines changed

1 file changed

+34
-2
lines changed

visualpython/data/m_library/pandasLibrary.js

Lines changed: 34 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2440,7 +2440,7 @@ define([
24402440
"name": "get data counts",
24412441
"library": "pandas",
24422442
"description": "get data value counts",
2443-
"code": "${o0} = ${i0}.value_counts()",
2443+
"code": "${o0} = ${i0}.value_counts(${bins}${sort}${ascending}${dropna}${etc})",
24442444
"options": [
24452445
{
24462446
"name": "i0",
@@ -2457,7 +2457,39 @@ define([
24572457
"component": [
24582458
"input"
24592459
]
2460-
}
2460+
},
2461+
{
2462+
"name": "bins",
2463+
"component": [
2464+
"input_number"
2465+
],
2466+
"help": "Only for Series object",
2467+
"usePair": true,
2468+
},
2469+
{
2470+
"name": "sort",
2471+
"component": [
2472+
"bool_select"
2473+
],
2474+
"default": "True",
2475+
"usePair": true,
2476+
},
2477+
{
2478+
"name": "ascending",
2479+
"component": [
2480+
"bool_select"
2481+
],
2482+
"default": "False",
2483+
"usePair": true,
2484+
},
2485+
{
2486+
"name": "dropna",
2487+
"component": [
2488+
"bool_select"
2489+
],
2490+
"default": "True",
2491+
"usePair": true,
2492+
},
24612493
]
24622494
},
24632495
"pdIdt_info": {

0 commit comments

Comments
 (0)