Getting Started with Julia by Balbaert Ivo
Author:Balbaert, Ivo [Balbaert, Ivo]
Language: eng
Format: mobi
Publisher: Packt Publishing
Published: 2015-02-26T00:00:00+00:00
Dictionaries
When you want to store and look up the values based on a unique key, then the Dictionary type Dict (also called hash, associative collection, or map in other languages) is what you need. It is basically a collection of two-element tuples of the form (key, value). To define a dictionary d1 as a literal value, the following syntax is used:
// code in Chapter 5\dicts.jl:
d1 = [1 => 4.2, 2 => 5.3]
It returns Dict{Int64,Float64} with 2 entries: 2 => 5.3 1 => 4.2, so there are two key-value tuples here, (1, 4.2) and (2, 5.3); the key appears before the => symbol and the value appears after it, and the tuples are separated by commas. The [ ] indicates a typed dictionary; all the keys must have the same type, and the same is true for the values. A dynamic version of a dictionary can be defined with { }:
Download
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.
Algorithms of the Intelligent Web by Haralambos Marmanis;Dmitry Babenko(8302)
Azure Data and AI Architect Handbook by Olivier Mertens & Breght Van Baelen(6749)
Building Statistical Models in Python by Huy Hoang Nguyen & Paul N Adams & Stuart J Miller(6727)
Serverless Machine Learning with Amazon Redshift ML by Debu Panda & Phil Bates & Bhanu Pittampally & Sumeet Joshi(6607)
Data Wrangling on AWS by Navnit Shukla | Sankar M | Sam Palani(6390)
Driving Data Quality with Data Contracts by Andrew Jones(6338)
Machine Learning Model Serving Patterns and Best Practices by Md Johirul Islam(6101)
Learning SQL by Alan Beaulieu(5996)
Weapons of Math Destruction by Cathy O'Neil(5780)
Big Data Analysis with Python by Ivan Marin(5369)
Data Engineering with dbt by Roberto Zagni(4368)
Solidity Programming Essentials by Ritesh Modi(4017)
Time Series Analysis with Python Cookbook by Tarek A. Atwan(3874)
Pandas Cookbook by Theodore Petrou(3584)
Blockchain Basics by Daniel Drescher(3295)
Hands-On Machine Learning for Algorithmic Trading by Stefan Jansen(2907)
Feature Store for Machine Learning by Jayanth Kumar M J(2815)
Learn T-SQL Querying by Pam Lahoud & Pedro Lopes(2797)
Mastering Python for Finance by Unknown(2744)
