make new dataframe from slice

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

we are a community of more than 2 million smartest coders
registration for
employee referral programs
are now open
get referred to google, amazon, flipkart and more
register now
  
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