1

I have a Dataframe that looks something like this:

   number       type   username  product publishing_dt
    0        1     access   kerrigan      897    2019-03-05
    1        1     access   kerrigan     1459    2008-05-06
    2        5     access   kerrigan   130365    2020-02-10
    3        7     access   kerrigan    86833    2020-02-04
    4        4     access   kerrigan     5467    2020-01-24
    5        7     access   kerrigan    78921    2019-11-03
    6        1  orderline   kerrigan    76863    2019-10-04
    7        1  orderline  45michael    76863    2019-10-04
    8        1  orderline   kerrigan    76863    2019-10-04
    9        1  orderline  45michael    86833    2020-02-04
    10       1  orderline  45michael    86833    2020-02-04

After performing some functions I'm getting a result which consists only on the product ids, an array that looks like this: [76863 86833 130635] and now I want to select these items and create a new Dataframe where I just have these products with their details (price, date, username, type, number).

Expected output:

   number       type   username  product publishing_dt
    2        5     access   kerrigan   130365    2020-02-10
    3        7     access   kerrigan    86833    2020-02-04
    6        1  orderline   kerrigan    76863    2019-10-04
    7        1  orderline  45michael    76863    2019-10-04
    8        1  orderline   kerrigan    76863    2019-10-04
    9        1  orderline  45michael    86833    2020-02-04
    10       1  orderline  45michael    86833    2020-02-04
Sara Kerrigan
  • 185
  • 1
  • 13

0 Answers0