How to split the whole dataset into 4 range based on one column using python
问题 I have a dataset with 7k records [telecom dataset] . I want to split that dataset into 4 range based on one particular column ["tenure column"] , which contains 1 to 72 number. Need to split the whole data based on this tenure column like:- 1 to 18 Range [1-dataset], 19 to 36 Range [2-dataset], 37 to 54 Range [3-dataset], 55 to 72 Range[4-dataset] My sample dataset with head(5) out.head(5) Out[51]: customerID Date gender age region SeniorCitizen Partner \ 0 9796-BPKIW 1/2/2008 1 57 1 1 0 1