Signature Description Parameters
template<typename ... Ts>
void
void self_rotate(size_type periods, shift_policy sp);
It rotates all the columns in self up or down based on shift_policy. The index column remains unchanged. If user rotates with periods that is larger than the column length, the behavior is undefined. Ts: The list of types for all columns. A type should be specified only once.
periods: Number of periods to rotate
shift_policy: Specifies the direction (i.e. up/down) to rotate
template<typename ... Ts>
StdDataFrame<I>
void rotate(size_type periods, shift_policy sp);
It is exactly the same as self_rotate, but it leaves self unchanged and returns a new DataFrame with columns rotated.