Example #1
0
    def test_empty_map(self):
        # when
        mapped_dict = map_values(times_2, {})

        # then
        self.assertEqual({}, mapped_dict)
Example #2
0
    def test_non_empty_map(self):
        # when
        mapped_dict = map_values(times_2, {'a': 2, 'b': 3})

        # then
        self.assertEqual({'a': 4, 'b': 6}, mapped_dict)
Example #3
0
 def _simple_dict_to_dataframe(d):
     return pd.DataFrame.from_dict(map_values(lambda x: [x], d))