Skip to content

Instantly share code, notes, and snippets.

@andrewm4894
Created June 14, 2019 09:56
Show Gist options
  • Save andrewm4894/4712cb82dfe4247da687bb11feed1f99 to your computer and use it in GitHub Desktop.
Save andrewm4894/4712cb82dfe4247da687bb11feed1f99 to your computer and use it in GitHub Desktop.
# this does not work
pipeline = {
{"resample" : {"type" : "trans", "name" : "resample", "kwargs" : {"rule" : "1min"}}}
}
pipeline
'''
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-10-7305ba79e664> in <module>
1 pipeline = {
----> 2 {"resample" : {"type" : "trans", "name" : "resample", "kwargs" : {"rule" : "1min"}}}
3 }
4 pipeline
TypeError: unhashable type: 'dict'
'''
# this does work
pipeline = dict()
pipeline["resample"] = {"type" : "trans", "name" : "resample", "kwargs" : {"rule" : "1min"}}
pipeline
'''
{'resample': {'type': 'trans', 'name': 'resample', 'kwargs': {'rule': '1min'}}}
'''
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment