Skip to content

Commit

Permalink
UP my solution
Browse files Browse the repository at this point in the history
  • Loading branch information
nadakass committed Dec 22, 2023
1 parent 2cc9394 commit 41da450
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions sklearn_questions.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,12 +182,11 @@ def get_n_splits(self, X, y=None, groups=None):
n_splits : int
The number of splits.
"""

X = X.reset_index()
self.time_ = X.loc[:, self.time_col_]

if self.time_.dtype != 'datetime64[ns]':
raise ValueError('not a datetime')
raise ValueError('Chosen column is not a datetime')
self.months_ = (np.sort((self.time_.dt.strftime('%Y-%m')).unique()))
print(self.months_)

Expand Down

0 comments on commit 41da450

Please sign in to comment.