How to Be...A Data Scientist: Day 1 Broadcast

Поділитися
Вставка
  • Опубліковано 5 вер 2024

КОМЕНТАРІ • 7

  • @ugnesimanaviciute1340
    @ugnesimanaviciute1340 Рік тому +1

    Sorry, seems that the live chat got closed, so I will post my questions here, if that's okay!
    Q1: for the example of a list, there was first an empty list, list = [], and then the list was defined to list = [1,2,3,4,5,6,7,8,9]. What is the reason for writing the first line with an empty list?
    Q2: what does the letter f before Hello do in this function:
    def hello(name):
    print(f’Hello + {name}’)
    hello(‘Charlie’)
    I tried to run it without the f and it printed a different line.
    Thank you!

    • @charlieroadhouse4349
      @charlieroadhouse4349 Рік тому +2

      A1: Sometimes you may want to make a list and only fill the list with data over time, for example maybe you are getting some data from a user that might have not entered the data yet
      A2: the f in the print simply means format, it is just an easy way of being able to enter a variable into a string to print

    • @ugnesimanaviciute1340
      @ugnesimanaviciute1340 Рік тому

      @@charlieroadhouse4349 Thank you very much!

  • @simpingforklaus5205
    @simpingforklaus5205 Рік тому

    Hi, I've tried the workbook and am struggling with one bit. What code do you use to find the count of the same values? I don't understand how you code this

    • @charlieroadhouse4349
      @charlieroadhouse4349 Рік тому +1

      Hello, if you are looking ahead in the workbook to other days that is fine but you may start to struggle without some explanations from broadcasts. The .value_counts() method will only work on categorical data such as the Embarked column on the titanic dataset, it will then return the count for each of the individual categories
      I hope this helps, comment back if you need more clarification

  • @njidekaokafor4006
    @njidekaokafor4006 Рік тому

    I tried uploading my screenshots but could only send one while I have about 5 of them. Are there other ways to submit?

    • @charlieroadhouse4349
      @charlieroadhouse4349 Рік тому +1

      Hello. We are aware of this issue. You can add all the images to a word doc and upload that word doc, don’t worry though because you have to upload the whole document at the end of the week