Level 10 : Given the following DataFrame df, what will df.loc[df['A'] > 2, 'B'] return?


import pandas as pd

df = pd.DataFrame({
    'A': [1, 2, 3, 4],
    'B': ['a', 'b', 'c', 'd']
})

Author: KaivalyaG | Tags: pandas | 1736+ Python FAQs | Share
multithreading | list-slicing | comment | python-module | decorator | exponentiation | implementation | sorted | oop | function-argument | datatype | destructor | math | string-manipulation | data-structure | decimal | format | bitwise-operator | int | __future__ | control-flow | sorting | enumerate() | class-and-object | logical-operator | package-management | tuple | python | bitwise-operator | multiprocessing | shallow-copy | context-manager | random | virtual-environment | generators-in-python | input-function | tuple-unpacking | asyncio | update | else-statement | nested-loop | python-repl | pickling-&-unpickling | static-method | for | control-flow | zip | higher-order-function | virtual-environment | classes | methods | regular-expression | keyword | while-and-for-loop | dicts | filter | choice | center | filter-function | floating-point-precision | string-formatting | condition | statement | encapsulation | file_handling | __init_subclass__ | oops | print-statement | escape-operator | built-in-function | command-line-parsing | rollback | version | global-variable | input-function | collection | mathematics | heap-memory | postfix | class-and-instance-variable | syntax-error | python-django | magic-method | immutability | attribute | match | fabs-function | string-concatenation | bitwise | while-loop | while-else-loop | function-and-scope | counter-function | typeerror | print | data-structure | string-slicing | namedtuple | list-join | arithmetic-operation | parameter | class-and-inheritance | mysql | call | interpreter | pandas | data_structure | overflow | logical-operator | id-function | multiple-inheritance | loops | encoding | matplotlib | round-function | min-max-function | string-iteration | array | append | python-history | sys-module | set-operation | formal-and-actual-parameter | range | datetime | set | complex-number | application | library | min-function | join | feature | data-type | exception-handling | loop-control | list-method | gil | list | syntaxerror | conditional-statement | variable | async | polymorphism | global-variable | exception-handling | dictionaries | design-principle | generators | asyncio-module | sum() | threading | inherit | max-min | slice | copy | map-function | scientific-notation | name-mangling | conversion | namespace | lambdas | operand | head-and-tail | debugging | input | swapping | numeric | indentation | def | string | file-handling | with-statement | conditional-statement | regex | iterable | type-conversion | identifier | boolean-and-non-boolean | default-mutable-argument | staticmethod | benefit | return-statement | arithmetic-expression | object-attribute | expression | python_version | yield | control-statement | operators | touples | data-structures | binary | comparison | zip-function | matrix | math-copysign | split | list-comprehension | boolean | pep | binary-operation | pseudocode | turtle | memory-management | frozenset | built-in | file-handling | list-vs-tuple | sum-function | compute | round | lambda | version-check | lambda-function | complex | mutable | precedence-and-associativity | list-comprehension | expand-tab | function | collections | method | constructor | assert | type-conversion | slicing | comprehension | memory | init | mapping-function | functional-programming | counter | precedence | list-operation | built-in-function | recurssion | operator-or | raise | syntax-error | __all__-attribute | numpy | class | logical-operation | string-method | operator-and | docstring | invalid-list | import-method | operations | string-method | odd-number | file | matrix-list-comprehension | descriptors | identity-operator | exception | deep-copy | goto-function | mathematical-function | operator-overloading | immutable-data-type | loop | access-modifier | sys | software-design | thread | type_conversion | generator | iterator | error-handling | basic | indexing | objects | functions | string-formatting | inheritance | module | data-type | stack | global | identity-operator | syntax | assignment-operator | zfill-function | list-mutation | list-indexing | factorial-function | installation | lists | integer | global-keyword | error | recursion | string-slicing | dictionary | operator | random-function ...