[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"$f6xLrBV9hwJ0khlaFanSpCjT0zWwFDuKO5SEg_duDnf8":3},{"answer":4,"createTime":5,"id":6,"options":7,"origin":12,"question":19,"related":20,"source":30,"type":31},[],"2026-04-28 15:01:02",353665830,[8,9,10,11],"df.loc['i1']","df.loc['i1', :]","df['i1']","df.iloc['i1']",{"count":13,"courseId":14,"courseImg":15,"courseName":16,"workId":17,"workName":18},24,"53e1d2ef4961cca8eea3e23969ad2cb9","https:\u002F\u002Ftihai-oss-cloud.itihey.com\u002Fimg\u002F03a579384a6dc297c89809b582fcc767.png","默认课程","1f3c690f9e884918b85fb8f61c4469aa","小测验-pandas数据选取","以下哪个代码可以选取&quot;i1&quot;行的所有列数据( )",[21,32,41,50,59,68,71,80,89,99],{"answer":22,"createTime":5,"id":23,"options":24,"question":29,"source":30,"type":31},[],353665825,[25,26,27,28],"df['score']","df.loc['score']","df.iloc['score']","df[score]","要直接选取DataFrame中&quot;score&quot;列的所有数据,正确的写法是( )","v1",0,{"answer":33,"createTime":5,"id":34,"options":35,"question":40,"source":30,"type":31},[],353665826,[36,37,38,39],"df.iloc['c1', 'c3']","df.loc['c1', 'c3']","df[['c1', 'c3']]","df['c1', 'c3']","以下哪种代码可以选取&quot;c1&quot;和&quot;c3&quot;两列数据的是( )",{"answer":42,"createTime":5,"id":43,"options":44,"question":49,"source":30,"type":31},[],353665827,[45,46,47,48],"i1到i3行(不含i3)","i1和i2行","i1、i2和i3行","i1行","使用df['c1']['i1':'i3']选取数据时,结果包含的行是( )",{"answer":51,"createTime":5,"id":52,"options":53,"question":58,"source":30,"type":31},[],353665828,[54,55,56,57],"df['c2'][i2,i4]","df['c2']['i2','i4']","df['c2'][['i2','i4']]","df['c2','i2':'i4']","要选取&quot;c2&quot;列中&quot;i2&quot;和&quot;i4&quot;行的数据,正确的直接选取方式是( )",{"answer":60,"createTime":5,"id":61,"options":62,"question":67,"source":30,"type":31},[],353665829,[63,64,65,66],"只能选行,不能选列","只能选列,不能选行","行标签在前,列标签在后","列标签在前,行标签在后","使用loc选取数据时,参数的顺序是( )",{"answer":69,"createTime":5,"id":6,"options":70,"question":19,"source":30,"type":31},[],[8,9,10,11],{"answer":72,"createTime":5,"id":73,"options":74,"question":79,"source":30,"type":31},[],353665831,[75,76,77,78],"df.loc[['i2','i4'], 'c1':'c3']","df.loc['i2','i4', 'c1':'c3']","df.loc['i2':'i4', 'c1':'c3']","df.loc['i2':'i4', 'c1','c3']","要选取&quot;i2&quot;到&quot;i4&quot;行(含)中&quot;c1&quot;到&quot;c3&quot;列(含)的数据,正确的loc用法是( )",{"answer":81,"createTime":5,"id":82,"options":83,"question":88,"source":30,"type":31},[],353665832,[84,85,86,87],"df.loc['i1','i3', 'c2']","df.loc['i1':'i3', 'c2']","df.loc[['i1','i3'], 'c2']","df.loc[['i1','i3'], 'c2':]","选取&quot;i1&quot;和&quot;i3&quot;行中&quot;c2&quot;列的数据,正确的代码是( )",{"answer":90,"createTime":91,"id":92,"options":93,"question":98,"source":30,"type":31},[],"2026-04-28 14:54:32",353665833,[94,95,96,97],"iloc使用整数索引,loc使用标签","loc使用整数索引,iloc使用标签","iloc只能选行,loc只能选列","没有区别","iloc与loc的主要区别是( )",{"answer":100,"createTime":5,"id":101,"options":102,"question":107,"source":30,"type":31},[],353665834,[103,104,105,106],"df.iloc[[0, 2], :]","df.iloc[:, 0-2]","df.iloc[:, 0, 2]","df.iloc[:, [0, 2]]","要选取第0列和第2列的所有行数据,使用iloc的正确代码是( )"]