1

Pandas Practice: Simple Query #1

Unsolved
Data Wrangling

Difficulty: 1 | Problem written by peter.washington

Educational Resource: https://web.stanford.edu/class/cs102/readings/pandasreferences.htm


Problem reported in interviews at

Apple
Netflix

Pandas data manipulation is a crucial skill for a data scientist.For this problem, you are given as input a dataframe. Return the list-of-strings representation of the column of the input dataframe, without indices, where column a is greater than column b.

For example, you could be given the following pandas dataframe, where a, b, and c are the column names and 0, 1, and 2 are the row indices:

   a b c

0 1 2 3

1 400 5 6

2 70 8 9

In this case, you would return the following list of strings, which represents the value of column c for row 1 and 2:

["6", "9"]

Sample Input:
<class 'str'>
df: a b c 0 1 2 3 1 400 5 6 2 7 8 9

Expected Output:
<class 'list'>
['6']

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

Repellat totam ratione quam unde culpa similique quibusdam reiciendis est earum veniam, unde culpa iusto nihil, labore iure quia rerum assumenda alias asperiores. Minima qui expedita, ad cumque aspernatur a facere impedit molestias rem voluptas ipsam officiis, facere earum recusandae ducimus doloribus temporibus blanditiis quis. Cum quia ut voluptatibus quas, eius est odit molestiae, tempore quis facilis consequuntur beatae aspernatur suscipit iusto minima?

Eius beatae dolorem aperiam pariatur vitae ea fugit quae magnam officia, natus aspernatur neque repellendus, dolores iste similique sed dolore fugiat nesciunt saepe temporibus distinctio ab, dolorum reiciendis dolores cumque totam earum.

Tenetur nemo quae doloribus voluptatem minima rerum illum veritatis, quam quia nihil sint recusandae aliquid, sunt voluptatum temporibus molestias nihil quaerat mollitia, porro dignissimos libero iure accusamus tempora provident odio sit quibusdam quaerat? Ad ducimus nesciunt excepturi incidunt, iusto fugiat amet praesentium soluta deleniti reprehenderit officia nobis nisi tenetur. Non magni deserunt facere soluta fugiat ipsum minima earum quisquam, vel odit harum eaque natus doloribus praesentium delectus debitis maxime assumenda modi.

This is a premium feature.
To access this and other such features, click on upgrade below.

Ready.

Input Test Case

Please enter only one test case at a time
numpy has been already imported as np (import numpy as np)