def _split_by_time(self, ratings):
        """Split the ratings DataFrame into train and test by timestamp
        Ratings[timestamp] extreme values used for the filtering interval

        Args:
            ratings (pd.Dataframe): pandas DataFrame of the following format
                userId	movieId	rating	timestamp
                20	1	924	     3.5	1094785598
                19	1	919	     3.5	1094785621
                86	1	2683	 3.5	1094785650
                61	1	1584	 3.5	1094785656
                23	1	1079	 4.0	1094785665

        Returns:
            train_events (pd.Dataframe): pandas DataFrame for training data
            test_events (pd.Dataframe): pandas DataFrame for training data
        """
        ts = ratings["timestamp"].sort_values()
        ts_max = ts.max()
        ts_min = ts.min()
        ts_split = ts_min + (ts_max - ts_min) * self.test_prop

        train_events = ratings[ratings["timestamp"] > ts_split]
        test_events = ratings[ratings["timestamp"] <= ts_split]

        return (train_events, test_events)
Split the ratings DataFrame into train and test by timestamp
        Ratings[timestamp] extreme values used for the filtering interval

        Args:
            ratings (pd.Dataframe): pandas DataFrame of the following format
                userId	movieId	rating	timestamp
                20	1	924	     3.5	1094785598
                19	1	919	     3.5	1094785621
                86	1	2683	 3.5	1094785650
                61	1	1584	 3.5	1094785656
                23	1	1079	 4.0	1094785665

        Returns:
            train_events (pd.Dataframe): pandas DataFrame for training data
            test_events (pd.Dataframe): pandas DataFrame for training data
        
catalyst/contrib/datasets/movielens.py