10. Solve using regexp_extract method |Top 10 PySpark Scenario-Based Interview Question| MNC

Поделиться
HTML-код
  • Опубликовано: 17 окт 2024
  • Dataset:
    data=[('ABSHFJFJ12QWERT12',1),('QWERT5674OTUT1',2),('DGDGNJDJ1234UYI',3)]
    df=spark.createDataFrame(data,schema="input_string string,id int")
    df.show()
    Here is the link to the project course:
    www.geekcoders...
    If you haven't taken my Azure End-to-End Project course then here is the link(More than 400 users have already taken it)
    www.geekcoders...
    Please visit my website also for more info
    www.geekcoders...
    Looking for 1:1 Long mentorship
    app.preplaced....
    HASHTAGS
    TAGS
    #tags #hashtags
    RUclips Link: / @geekcoders
    GeekCoders: www.geekcoders...
    LinkedIn: / sagar-prajapati-86073b155
    Telegram: lnkd.in/dKz7s3y8
    Instagram: lnkd.in/dKz7s3y8
    #pyspark #pysparkinterview #spark

Комментарии • 8

  • @caocheranofarinha
    @caocheranofarinha Год назад +1

    Big hugs bro directly from brasil. I've started work with bricks not so long and I 've learned a lot from your videos

  • @prabhatsingh7391
    @prabhatsingh7391 10 месяцев назад

    Hi sagar can you please explain about index 2 output .

  • @sravankumar1767
    @sravankumar1767 Год назад +1

    Nice explanation bro 👍 👌 👏

  • @RohanBhattacharyya-j1g
    @RohanBhattacharyya-j1g Год назад +3

    Thanks! Tried it this way.
    df.select("*").withColumn("new_col",regexp_extract(df.input_string,'([a-zA-Z]+[0-9]+)',1 )).withColumn("new_col1",regexp_extract(df.input_string,'([a-zA-Z]+[0-9]+)(\\w+)',2 )).drop("input_string","id").show()

  • @ritzysquad1361
    @ritzysquad1361 Год назад

    hi, can you please make a tutorial on migrating data from MYSQL to SNOWFLAKE Using Python