Skip to content

Commit 1d6541d

Browse files
authored
Update get.py
1 parent 4b5cf29 commit 1d6541d

File tree

1 file changed

+0
-18
lines changed

1 file changed

+0
-18
lines changed

braininventory/get.py

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -278,31 +278,13 @@ def __get_affiliations(df):
278278
A dictionary where the keys represent unique values in the "affiliation"
279279
column, and the values represent the count of occurrences of each unique value.
280280
281-
Example:
282-
--------
283-
>>> import pandas as pd
284-
>>> data = {
285-
... "name": ["John", "Jane", "Michael", "Emily", "William"],
286-
... "affiliation": ["Company A", "Company B", "Company A", "Company C", "Company B"]
287-
... }
288-
>>> df = pd.DataFrame(data)
289-
>>> result = __get_affiliation(df)
290-
>>> print(result)
291-
{
292-
"Company A": 2,
293-
"Company B": 2,
294-
"Company C": 1
295-
}
296-
297281
Note:
298282
-----
299283
The input DataFrame `df` should have a column named "affiliation" containing
300284
categorical data, where the function will count the occurrences of each unique value.
301285
"""
302286
return df["affiliation"].value_counts().to_dict()
303287

304-
305-
306288
def __get_contributors(df):
307289
return df["contributorname"].value_counts().to_dict()
308290

0 commit comments

Comments
 (0)