In a statement like “quotesdf = quotesdf.drop(['date'], axis = )”, the argument of “axis” can only be 0 or 1. “0” represents an operation of a certain column in DataFrame; “1” represents an operation of a certain row in DataFrame.
举一反三
- Among the following options, the correct descriptions inclue ______. A: pass represents an empty operation, only plays a place-occupied role B: pass can only be used in conditional statements C: For the statement sequence under if, it is allowed that there is only one pass statement D: pass can be used to jump out of the loop statement
- DataFrame对象列索引,表名不同列,纵向索引,叫columns,1轴,axis=1。
- 将df的行索引降序+列索引升序排序,正确的方法是( )。 A: 先df.sort_index(axis = 0,ascending = False),然后df.sort_index(axis = 0,ascending = True) 。 B: df.sort_index(axis = 0,ascending = True).sort_index(axis = 1,ascending = False)。 C: df.sort_index(axis = 0,ascending = False).sort_index(axis = 1)。 D: 先df.sort_index(axis = 0,ascending = False),然后df.sort_index(axis = 0) 。
- If you want to get the axis like following figure, how to set the axis?[img=570x508]17de94b382954af.png[/img] A: axis( [ 0 10 15 -10 ] ); B: axis( [ -10 15 0 10 ] ); C: axis( [ 0 10 -10 15 ] ); D: axis( [ 0 -10 10 15 ] );
- In a randomized complete block design, if there is a certain interaction effect, then we can use ( ) to eliminate the interaction. A: Exponentiation B: Square-Root Operation C: Absolute value Operation D: Logarithm Operation