Skip to content

Commit

Permalink
Up my solution
Browse files Browse the repository at this point in the history
  • Loading branch information
SebX-7879 committed Dec 21, 2023
1 parent 032576e commit 02dda0a
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions sklearn_questions.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,12 +64,12 @@

def most_common_label(array):
"""Return the most common label in the array.
Args:
array : the array of labels
Returns:
most_common : the most common label in the array
"""

counter = Counter(array)
most_common = counter.most_common(1)
# If there is a tie for the most common label, this will return the first \
Expand Down Expand Up @@ -241,8 +241,7 @@ def split(self, X, y, groups=None):


def main():
"""Main function to test the classes.
"""
"""Test the different classes."""
# Create a DataFrame with a datetime column
date_range = pd.date_range(start='1/1/2020', end='1/1/2022', freq='D')
df = pd.DataFrame({
Expand Down

0 comments on commit 02dda0a

Please sign in to comment.