def split_batches(self, data, minibatch_size= None):
		"""Split data into minibatches with a specified size

		Parameters
		----------
		data: iterable and indexable
			List-like data to be split into batches. Includes spark_contextipy matrices and Pandas DataFrames.

		minibatch_size: int
			Expected sizes of minibatches split from the data.

		Returns
		-------
		data_split: list
			List of minibatches, each entry is a list-like object representing the data subset in a batch.
		"""
		if minibatch_size==None: minibatch_size= self.minibatch_size
		if isinstance(data, list) or isinstance(data, tuple):  len_data= len(data)
		else:  len_data= data.shape[0]
		if isinstance(data,pd.DataFrame):
			data_split = [data.iloc[x * minibatch_size:(x + 1) * minibatch_size] for x in
						  range(int(ceil(len_data / minibatch_size)))]
		else:
			data_split= [data[x* minibatch_size:min(len_data, (x+1)*minibatch_size)]
						 for x in range(int(ceil(len_data/minibatch_size)))]
		return data_split
Split data into minibatches with a specified size

		Parameters
		----------
		data: iterable and indexable
			List-like data to be split into batches. Includes spark_contextipy matrices and Pandas DataFrames.

		minibatch_size: int
			Expected sizes of minibatches split from the data.

		Returns
		-------
		data_split: list
			List of minibatches, each entry is a list-like object representing the data subset in a batch.