已知df为pandas的DataFrame对象,那么df[:10]表示访问df中前10行数据。
已知df为pandas的DataFrame对象,那么df[:10]表示访问df中前10行数据。
参考答案和解析
D
相关考题:
当船舶处于纵倾状态时,其平均吃水的计算式为_________。A.dm=(dF+dA)/2B.dm=(dF+dA)/2-(dF-dA)xf/LbpC.dm=(dF+dA)/2+(dF-dA)xf/2D.dm=(dF+dA)/2+(Lbp×xf)xf/(dF-dA)
在Pandas中我们可以设定某一列为特定的索引列,如我们希望把id这一列设置为索引列,那么可以用以下哪种代码实现。A.df.set_index(‘id’)B.df.set(‘id’)C. df.load_index(‘id’)D.df.get_index(‘id’)
在 Pandas中,drop_duplicates() 提供了删除重复值的功能,这个方法主要帮助我们删除后出现的重复值。例如,某列数据如下:Open: Open1 12 23 删除后变为 34 43 那么以下哪种参数可以帮助我们实现删除先出现的重复值。A.df[‘open’].drop_first()B. df[‘open].drop_duplicates(keep=’first’)C.df[‘open’].drop_duplicates(keep=’last’)D.df[‘open’].drop_last()
当船舶处于纵倾状态时,其平均吃水的计算式为()。A、dm=(dF+dA)/2B、dm=(dF+dA)/2+t×Xf/LbpC、dm=(dF+dA)/2+(dF-dA)×Xf/2D、dm=(dF+dA)/2+(Lbp×Xf)×Xf/(dF-dA)
已定义下列变量: int n; float f; double df; df=10; n=2; 下列语句正确的是()A、 f=12.3;B、 n=df;C、 df=n=100;D、 f=df;
Which of the following commands will display what space is used in /tmp filesystem?()A、df -Ik /tmpB、df -fk /tmpC、df -Uk /tmpD、df -Fk /tmp
14. DateFormat df; 15. Date date = new Date(); 16. //insert code here 17. String s = df.format( date); Which two,inserted independently at line 16, allow the code to compile?()A、 df= new DateFormat();B、 df= Date.getFormatter();C、 df= date.getFormatter();D、 df= date.getDateFormatter();E、df = DateFormat.getDateInstance();F、 df= DateFormat.getInstance();
单选题已定义下列变量: int n; float f; double df; df=10; n=2; 下列语句正确的是()A f=12.3;B n=df;C df=n=100;D f=df;