Q. Which method is used to shift the data in a Series or DataFrame by a certain number of periods?
β
Correct Answer: (A)
shift()
Explanation: The shift() method shifts the data by the specified number of periods, which is useful for time series analysis.