ibis 测试
import ibis import pandas as pd from ibis import _ penguins = ibis . examples .penguins. fetch () df = pd . DataFrame ( [[ "a" , 1 , 2 ], [ "b" , 3 , 4 ]], columns = [ "one" , "two" , "three" ], index = [ 5 , 6 ], ) t = ibis . memtable ( df , name = "t" ) ( penguins . filter ([ _ .species == "Adelie" , _ .island.isin([ "Biscoe" , "Dream" ])])) ( penguins . limit ( 11 , offset = 9 )) ( penguins . order_by ([ _ .island, _ .bill_length_mm.desc()])) ( penguins . select ( _ .bill_length_mm, _ .sex)) ( penguins . rename ( bill_length = "bill_length_mm" , bill_depth = "bill_depth_mm" )) ( penguins . mutate ( ones = 1 , bill_length = _ .bill_length_mm / 10 ) . mutate ( bill_length_squared = _ .bill_length ** 2 ) . select ( _ .ones, _ .bill_length_mm, _ .bill_length, _ .bill_length_squared) ) ( penguins . select ( _ .island, _ .