Top "Dictionary" questions

A dictionary maps keys to values allowing efficient retrieval of values by keys.

Remap values in pandas column with a dict

I have a dictionary which looks like this: di = {1: "A", 2: "B"} I would like to apply it to the "col1" …

python dictionary pandas remap
What's the difference between ConcurrentHashMap and Collections.synchronizedMap(Map)?

I have a Map which is to be modified by several threads concurrently. There seem to be three different synchronized …

java dictionary concurrency
How to sum all the values in a dictionary?

Let's say I have a dictionary in which the keys map to integers like: d = {'key1': 1,'key2': 14,'key3…

python dictionary hash sum
When is del useful in python?

I can't really think of any reason why python needs the del keyword (and most languages seem to not have …

python dictionary python-internals del
How can I convert JSON to a HashMap using Gson?

I'm requesting data from a server which returns data in the JSON format. Casting a HashMap into JSON when making …

java json dictionary hashmap gson
How to check if a variable is a dictionary in Python?

How would you check if a variable is a dictionary in python? For example, I'd like it to loop through …

python dictionary
How to initialize a dict with keys from a list and empty value in Python?

I'd like to get from this: keys = [1,2,3] to this: {1: None, 2: None, 3: None} Is there a pythonic way of doing it? …

dictionary python
How do I write a Python dictionary to a csv file?

I have what I think should be a very easy task that I can't seem to solve. How do I …

python dictionary
Merging dictionaries in C#

What's the best way to merge 2 or more dictionaries (Dictionary<T1,T2>) in C#? (3.0 features like LINQ are …

c# dictionary merge
Does VBA have Dictionary Structure?

Does VBA have dictionary structure? Like key<>value array?

vba dictionary data-structures vb6