make new dataframe from slice

Solutions on MaxInterview for make new dataframe from slice by the best coders in the world

showing results for - "make new dataframe from slice"
Malia
12 Aug 2016
1# You need copy with boolean indexing, new DataFrame constructor is not necessary:
2
3d2 = d1[d1.a > 1].copy()
4