Data Science with Python | Kanth

Discussion in 'Big Data and Analytics' started by Nishant_Singh, Jun 1, 2019.

  1. Nishant_Singh

    Nishant_Singh Well-Known Member
    Simplilearn Support

    Joined:
    Aug 1, 2018
    Messages:
    222
    Likes Received:
    31
    #1
  2. Satish Nalla_1

    Satish Nalla_1 New Member

    Joined:
    May 30, 2019
    Messages:
    1
    Likes Received:
    0
    hi testing
     
    #2
  3. amit kumar_94

    amit kumar_94 Member

    Joined:
    May 18, 2019
    Messages:
    3
    Likes Received:
    0
    could you please suggest the best book to start data science with python?, thanks
     
    #3
  4. _34601

    _34601 Data Analyst
    Alumni

    Joined:
    Jul 13, 2018
    Messages:
    2
    Likes Received:
    1
    So much to cover on Data Science
     
    #4
    SUNNY BHAVEEN CHANDRA likes this.
  5. SUNNY BHAVEEN CHANDRA

    SUNNY BHAVEEN CHANDRA Well-Known Member

    Joined:
    Feb 4, 2019
    Messages:
    56
    Likes Received:
    8
    Hey Amit,
    There are a lot of books in the market but before going through them I would like to suggest you to go through the self-learning course provided by simplilearn in your LMS for data science with python as it will help you to gain more insights into the course and also in live sessions. Most of the books like
    1.Hands-on Machine Learning with Scikit-Learn and TensorFlow,
    2.Python for Data Analysis: Data Wrangling with Pandas, NumPy, and Ipython,
    3.Python Data Science Handbook: Essential Tools for Working with Data
    etc are not that beginner friendly. So go through your current course and then you can follow these books for more insights.
    I hope this helps!
    Regards,
    Sunny
    Sr. Teaching Assistant
    Simplilearn
     
    #5
  6. Fasih Ahmed

    Fasih Ahmed Member

    Joined:
    May 22, 2019
    Messages:
    3
    Likes Received:
    2
    Hi Kanth,

    I have been trying to filter on a date column where date in csv file >= today date.
    but unfortunately, I am getting an error as below
    TypeError: '>' not supported between instances of 'builtin_function_or_method' and 'builtin_function_or_method'

    Here is my approach

    import pandas as pd
    import numpy as np
    import datetime as dt
    Todaysdate = dt.date.today

    df = pd.read_csv("Data.csv, parse_dates=['JobIDDate'], dayfirst=True")

    df1 = df[(df['JobIDDate'] >= Todaysdate)]

    While printing df1 getting the same error which i mentioned above.

    2nd approach is
    df[df'['JobIDDate'] >= Todaysdate]

    Request you to please I need to read whole csv but after that i need only those records which are greater than or equal to today's date and then i would store that data into a seprate csv file.
     

    Attached Files:

    #6
    SUNNY BHAVEEN CHANDRA likes this.
  7. Fasih Ahmed

    Fasih Ahmed Member

    Joined:
    May 22, 2019
    Messages:
    3
    Likes Received:
    2
    Hi please reply.
     
    #7
  8. Bhargav Jagathabhi

    Bhargav Jagathabhi New Member

    Joined:
    Apr 22, 2019
    Messages:
    1
    Likes Received:
    0
    Hi Armando,

    Confusion matrix printed with dimensions of 5x5? unlike in sessions which is 2x2.
    [[ 0 0 0 14155 0]
    [ 0 0 0 27084 0]
    [ 0 0 0 64852 0]
    [ 0 0 0 87473 0]
    [ 0 0 0 56489 0]]

    Can you let me know what would have went wrong?
     
    #8
  9. Amit_565

    Amit_565 New Member

    Joined:
    May 21, 2019
    Messages:
    1
    Likes Received:
    0
    Hello Kanth and All,
    i am fresher in coding and programming, i don't know a single word in programming , kindly help me ,how to start ,what is process i will apply ..i am so confused, i trying to understand the code logic but fails.
    Anyone suggest me please ...
     
    #9
  10. Srijith Kaladharan

    Joined:
    Mar 14, 2019
    Messages:
    3
    Likes Received:
    1
    Hi Kanth..

    I am not able to download the files from the google drive.
    The email id associated with my simplilearn account is an outlook e-mail account.
    Can you please help me with this?
     
    #10
  11. SUNNY BHAVEEN CHANDRA

    SUNNY BHAVEEN CHANDRA Well-Known Member

    Joined:
    Feb 4, 2019
    Messages:
    56
    Likes Received:
    8
    Hi Fasih,

    The following code will work perfectly fine-
    Code:
    import pandas as pd
    import numpy as np
    df = pd.read_csv("Data.txt", sep="\t", parse_dates = ["JobIDDate"], dayfirst=True)
    Todaysdate = pd.datetime.today()
    print(Todaysdate)
    df1 = df[(df['JobIDDate'] >= Todaysdate)]
    df1
    My Comment on your code -
    1. Here today is a method so instead of Todaysdate = dt.date.today use Todaysdate = dt.date.today()
    2. Now no need to import datetime library separately as pandas too have the same you can check the code provided me.
    3. And there were few other errors in the code that I'm sure you'll figure out. https://www.stackoverflow.com is really a good friend for many developers. :p
    4. to save your CSV file you can use
    Code:
     df1.to_csv("newFile.csv", index=None) 
    I hope this helps.

    Regards,
    Sunny
    Sr. Teaching Assistant
     
    #11
    Fasih Ahmed likes this.
  12. SUNNY BHAVEEN CHANDRA

    SUNNY BHAVEEN CHANDRA Well-Known Member

    Joined:
    Feb 4, 2019
    Messages:
    56
    Likes Received:
    8
    Hi Srijith,

    You just need a Gmail account to access the drive whether it is registered on our website or not it doesn't matter.
    I hope this helps.

    Regards,
    Sunny
    Sr. Teaching Assistant
     
    #12
  13. SUNNY BHAVEEN CHANDRA

    SUNNY BHAVEEN CHANDRA Well-Known Member

    Joined:
    Feb 4, 2019
    Messages:
    56
    Likes Received:
    8
    Hi Amit,

    Follow our self-learning course at this URL for python programming -> https://lms.simplilearn.com/#/course/3381-Programming-with-Python-3.X
    Or you can also read the following book -
    Learn Python 3 The Hard Way
    by Zed A.Shaw (Author)


    And most importantly practice is the key! :)

    I hope this will help you.

    Regards,
    Sunny
    Sr. Teaching Assistant
     
    #13
  14. Srijith Kaladharan

    Joined:
    Mar 14, 2019
    Messages:
    3
    Likes Received:
    1

    Thanks Sunny for prompt reply.. I even tried with my gmail account.. But i am getting an access denied prompt.

    Below is the screenshot of the prompt I get when i try to download the file from the drive.
    upload_2019-6-14_20-13-4.png
     
    #14
  15. SUNNY BHAVEEN CHANDRA

    SUNNY BHAVEEN CHANDRA Well-Known Member

    Joined:
    Feb 4, 2019
    Messages:
    56
    Likes Received:
    8
    Hi Srijith,

    Follow these steps -
    1. Press control+shift+N. This will open a new incognito window in chrome. For Firefox its control+shift+P.
    2. Sign in with ur relevant account and it's done.!!! Now use that link. It should work perfectly.

    And I tried this without signing in as well and I was able to access the files. Try at your end and let me know.

    Regards,
    Sunny
    Sr. Teaching Assistant
     
    #15
  16. Fasih Ahmed

    Fasih Ahmed Member

    Joined:
    May 22, 2019
    Messages:
    3
    Likes Received:
    2
    Thank you Sunny. It is working awesome.
     
    #16
    SUNNY BHAVEEN CHANDRA likes this.
  17. Srijith Kaladharan

    Joined:
    Mar 14, 2019
    Messages:
    3
    Likes Received:
    1
    It worked Sunny.. Thanks alot ;)
     
    #17
    SUNNY BHAVEEN CHANDRA likes this.
  18. _54418

    _54418 New Member

    Joined:
    Jan 3, 2019
    Messages:
    1
    Likes Received:
    0
    Can anyone help with anything related to Project 2 last part?
    Project2 (Customer Service Requests Analysis) which is as follows:

    Perform a statistical test for the following:

    Please note: For the below statements you need to state the Null and Alternate and then provide a statistical test to accept or reject the Null Hypothesis along with the corresponding ‘p-value’.

    • Whether the average response time across complaint types is similar or not (overall)
    • Are the type of complaint or service requested and location related?
     
    #18
  19. Sanjib Kumar Ghosh

    Joined:
    May 27, 2019
    Messages:
    2
    Likes Received:
    0
    Hi Sunny/Kanth
    Due to personal emergency i was not able to join today's class, so i am requesting for the recordings to be sent to me personal email ID tomorrow as an when ti is generated, as i have been registered from back end so did not get the option to download from website.
    I also have raised the ticket for the same.
    Thanks
    Sanjib Ghosh
     
    #19
  20. SUNNY BHAVEEN CHANDRA

    SUNNY BHAVEEN CHANDRA Well-Known Member

    Joined:
    Feb 4, 2019
    Messages:
    56
    Likes Received:
    8
    Hi Sanjib,

    From now onwards all the recording links will be available in the shared google drive folder inside a spreadsheet as well.
    -> https://docs.google.com/spreadsheets/d/1bZJ3DxxMCeDRtoall56wOQ3FlF35sWIWftmAhpE0CBk/edit#gid=0
    you can use these links to download the recordings plus this will also help other candidates who were registered from the backend. Now no need to raise a request for this.

    I hope this will help you and others.

    Regards,
    Sunny
    Sr. Teaching Assistant
     
    #20
  21. Sanjib Kumar Ghosh

    Joined:
    May 27, 2019
    Messages:
    2
    Likes Received:
    0
    Thanks Sunny.
     
    #21
  22. Neha_151

    Neha_151 New Member

    Joined:
    Feb 13, 2018
    Messages:
    1
    Likes Received:
    1
    Hi Sunny,

    For Movie lens project

    1. Top 25 movies by viewership rating-I tried this query:

    Movie_Rating_User is master table

    **Code**
    Movie_Rating_User.groupby(["Movie_ID","User_id"])
    Top_rating=Movie_Rating_User.sort_values("Rating" ,axis =0 ,ascending = False)
    Top_25_Rating=print(Top_rating [0:24])

    Do we need to use 'group by'on User id and Movie_id or this syntax is ok?Above code only provides top movies with rating 5 irrespective of User_id.Is this approach correct?

    2. Create a separate column for each genre category with a one-hot encoding (1 and 0) whether or not the movie belongs to that genre.

    My query is to split the column(GenEre) and added it back to same dataframe 'name1' but not getting expected output.

    name1 = Movies[["Movie_ID","GenEre"]]
    name1.set_index('Movie_ID', inplace = True)
    name2 = name1["GenEre"].str.split("|", n = 4, expand = True)
     
    #22
    SUNNY BHAVEEN CHANDRA likes this.
  23. DIVAKAR PISUPATI

    Alumni

    Joined:
    Apr 23, 2016
    Messages:
    11
    Likes Received:
    0
    Hi Sunny
    I am not able access Cloud Lab as it says Limit exceeded. Please enable the same so that I can complete my project asap.

    Thanks
    Divakar
     
    #23
  24. Sandhya Arumugam

    Joined:
    Mar 21, 2019
    Messages:
    3
    Likes Received:
    1
    Sunny, In Project 2 Customer Service Requests Analysis, the below step is confusing to me. Can you explain what is expected

    4. Order the complaint types based on the average ‘Request_Closing_Time’, grouping them for different locations.
     
    #24
    S Ashok Kumar_1 likes this.
  25. S Ashok Kumar_1

    S Ashok Kumar_1 New Member

    Joined:
    May 8, 2019
    Messages:
    1
    Likes Received:
    0
    I do not understand exactly about project2 Customer Service Requests Analysis
    can u please help me in that?
     
    #25
  26. _40387

    _40387 Member

    Joined:
    Sep 14, 2018
    Messages:
    6
    Likes Received:
    1
    Hello ,

    I am still struggling in Project , i was not able to create the on-hot encoding

    "Create a separate column for each genre category with a one-hot encoding ( 1 and 0) whether or not the movie belongs to that genre. "

    Any one managed to to the transformation to to on-hot encoding ?
     
    #26
  27. _40387

    _40387 Member

    Joined:
    Sep 14, 2018
    Messages:
    6
    Likes Received:
    1

    I tried to do
    sample_df = Master_df.sample(n=10) # choose sample from b publuation

    G=('Adventure', 'Animation', "Children's",'Comedy','Crime','Documentary', 'Drama','Fantasy', 'Film-Noir', 'Horror','Musical','Mystery','Romance' , 'Sci-Fi','Thriller','War', 'Western')

    for i in G:
    sample_df= int(i in sample_df['Genres'] )

    but i am getting all zeros
     
    #27
  28. SUNNY BHAVEEN CHANDRA

    SUNNY BHAVEEN CHANDRA Well-Known Member

    Joined:
    Feb 4, 2019
    Messages:
    56
    Likes Received:
    8
    Hi,

    I'm sharing a demo code (in PDF format attached below) which will definitely help you, Try to apply this hint at your end. And if you still face this issue then connect with me over a call after 1700 hrs IST today at the toll-free no. available at the bottom of our website www.simplilearn.com

    Regards,
    Sunny
    Sr. Teaching Assistant
     

    Attached Files:

    #28
  29. SUNNY BHAVEEN CHANDRA

    SUNNY BHAVEEN CHANDRA Well-Known Member

    Joined:
    Feb 4, 2019
    Messages:
    56
    Likes Received:
    8
    Hi Sandhya,

    If your query is still pending then let me know a suitable time for you I will connect with you or you can also connect with me over a call at our toll-free no. available on our website.

    Regards,
    Sunny
    Sr. Teaching Assistant
     
    #29
  30. SUNNY BHAVEEN CHANDRA

    SUNNY BHAVEEN CHANDRA Well-Known Member

    Joined:
    Feb 4, 2019
    Messages:
    56
    Likes Received:
    8
    Hi Divakar,

    I checked your cloud lab and its working perfectly fine. Can you check at your end?
    Although this is not the perfect place to raise this kind of issue. You can always reach out to us over a call or by raising a help and support ticket from your LMS. And also I would like to suggest you that keep a backup of your files as well on your local machine so that you don't get stuck if such technical glitch arises.

    Regards,
    Sunny
    Sr. Teaching Assistant
     
    #30
  31. SUNNY BHAVEEN CHANDRA

    SUNNY BHAVEEN CHANDRA Well-Known Member

    Joined:
    Feb 4, 2019
    Messages:
    56
    Likes Received:
    8
    Hi Neha,

    If your query is still pending then let me know a suitable time for you I will connect with you or you can also connect with me over a call at our toll-free no. available on our website.

    Regards,
    Sunny
    Sr. Teaching Assistant
     
    #31
  32. SUNNY BHAVEEN CHANDRA

    SUNNY BHAVEEN CHANDRA Well-Known Member

    Joined:
    Feb 4, 2019
    Messages:
    56
    Likes Received:
    8
    Hi Ashok,

    If your query is still pending then let me know a suitable time for you I will connect with you or you can also connect with me over a call at our toll-free no. available on our website.

    Regards,
    Sunny
    Sr. Teaching Assistant
     
    #32
  33. _40387

    _40387 Member

    Joined:
    Sep 14, 2018
    Messages:
    6
    Likes Received:
    1
    I did something similar, your hint is much easier thank you a lot :)
     
    #33
    SUNNY BHAVEEN CHANDRA likes this.
  34. _34601

    _34601 Data Analyst
    Alumni

    Joined:
    Jul 13, 2018
    Messages:
    2
    Likes Received:
    1
    Hi Sunny,

    For the Movielens Project, should we be;
    1 Using the Dataframe with Each column Genres (0/1) plus the entire Master_data to build our model
    2 Should we use Logistic or Linear Regression to build the model
    2. Should "Rating" be considered as Discrete or Continous variable?
     
    #34
  35. SADHIIR RAZAAK.N

    Joined:
    May 18, 2019
    Messages:
    2
    Likes Received:
    0
    hii sunny,
    when i try to import the dataset parser error is coming i am not sure on what to do next
     
    #35
  36. SUNNY BHAVEEN CHANDRA

    SUNNY BHAVEEN CHANDRA Well-Known Member

    Joined:
    Feb 4, 2019
    Messages:
    56
    Likes Received:
    8
    Hi All,

    Kindly reach out to us to resolve your specific query on our toll-free no. available at our website www.simplilearn.com at the bottom and connect with me or any teaching assistant available for python, they will surely help you. I have also attached a screenshot for your reference.

    Note: Toll-free no. is region specific so it may change based on your geographic location. Hence for correct location follow the above-mentioned step.

    Regards,
    Sunny
    Sr. Teaching Assistant
    Simplilearn

    t45.PNG
     
    #36

Share This Page