Programming Bootcamp for Scientists #21

Bootcamp
  • 00:00 Dictionaries

  • 00:40 Windows: mapping file extensions (.py) to an action in Windows File Explorer; The "where" command of Windows.

  • 05:15 What is a Dictionary? ( Hash, Mapcar)

  • 06:40 When to use Dictionaries?

  • 07:31 Create dictionary

  • 10:05 Dictionary keys

  • 10:48 Loop over keys()

  • 11:26 Loop using items()

  • 12:25 Dictionary values()

  • 12:50 Not existing key

  • 13:15 Get key - get()

  • 16:20 Does the key exist? (in)

  • 17:05 How can you search among the values? Does the value exist? - values()

  • 19:00 How dictionaries work? What is hashing?

  • 23:25 Delete key (del, pop)

  • 25:25 List of dictionaries

  • 29:35 In the lambda/map case we did not use key= while in the sort-case we did. Why?

  • 31:35 Shared dictionary - skipped

  • 31:55 tuples as dictionary keys

  • 32:35 numbers as dictionary keys

  • 32:45 Sort dictionary by value

  • 38:00 So at the end, are the keys kept in order in the dictionary or not?

  • 40:42 A few more words about hashing. Hashing algorithms: (md5, sha1). Comparing files.

  • 42:55 Dictionaries vs. lists.

  • 43:40 Exercise: count characters

  • 44:20 Exercise: count words

  • 44:50 Exercise: count words from a file

  • 45:10 Apache log

  • 47:13 Exercise: combine lists again

  • 47:33 Exercise: counting DNA bases

  • 48:03 Exercise: count Amino Acids

  • 48:19 Exercise: List of dictionaries

  • 50:00 Exercise: Dictionary of dictionaries

  • 50:40 Exercise: Age limit with dictionaries

Author

Gabor Szabo (szabgab)

Gabor Szabo, the author of the Python Maven web site.

Gabor Szabo