<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def rsum(self, time_period: str, num_col: str="Number", dateindex: str=None):
 		""" 		Resample and add a sum the main dataframe to a time period 		:param time_period: unit + period: periods are Y, M, D, H, Min, S 		:param time_period: str 		:param num_col: number of the new column, defaults to "Number" 		:param num_col: str, optional 		:param dateindex: column name to use as date index, defaults to None 		:param dateindex: str, optional 		:example: ``ds.rsum("1D")`` 		"""

		try:
			df = self._resample_("sum", time_period,
								 num_col, dateindex)
			self.df = df
			if df is None:
				self.err("Can not sum data")
		except Exceptions as e:
			self.err(e, "Can not sum data")