{"action":"opened","issue":{"url":"https://api.github.com/repos/kieferk/dfply/issues/33","repository_url":"https://api.github.com/repos/kieferk/dfply","labels_url":"https://api.github.com/repos/kieferk/dfply/issues/33/labels{/name}","comments_url":"https://api.github.com/repos/kieferk/dfply/issues/33/comments","events_url":"https://api.github.com/repos/kieferk/dfply/issues/33/events","html_url":"https://github.com/kieferk/dfply/issues/33","id":255006538,"number":33,"title":"mask does not work in 0.2.4 properly","user":{"login":"Make42","id":4905185,"avatar_url":"https://avatars2.githubusercontent.com/u/4905185?v=4","gravatar_id":"","url":"https://api.github.com/users/Make42","html_url":"https://github.com/Make42","followers_url":"https://api.github.com/users/Make42/followers","following_url":"https://api.github.com/users/Make42/following{/other_user}","gists_url":"https://api.github.com/users/Make42/gists{/gist_id}","starred_url":"https://api.github.com/users/Make42/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Make42/subscriptions","organizations_url":"https://api.github.com/users/Make42/orgs","repos_url":"https://api.github.com/users/Make42/repos","events_url":"https://api.github.com/users/Make42/events{/privacy}","received_events_url":"https://api.github.com/users/Make42/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-09-04T10:55:33Z","updated_at":"2017-09-04T10:55:33Z","closed_at":null,"author_association":"NONE","body":"The line\r\n\r\n    series = signals.loc[(signals.type == sig_type) & (signals.part_number == sig_partnr), 'value']\r\n\r\nis working for my code, the line\r\n\r\n    series = signals >> mask(X.type == sig_type, X.part_number == sig_partnr) >> select('value')\r\n\r\nresults in the error\r\n\r\n```\r\nTraceback (most recent call last):\r\n  File \"<input>\", line 1, in <module>\r\n  File \"[..]/dfply/base.py\", line 45, in __rrshift__\r\n    result = self.function(other_copy)\r\n  File \"[..]/dfply/base.py\", line 52, in <lambda>\r\n    return pipe(lambda x: self.function(x, *args, **kwargs))\r\n  File \"[..]/dfply/base.py\", line 112, in __call__\r\n    return self.function(*args, **kwargs)\r\n  File \"[..]/dfply/base.py\", line 179, in __call__\r\n    evaluation = self.call_action(args, kwargs)\r\n  File \"[..]/dfply/base.py\", line 253, in call_action\r\n    return symbolic.to_callable(symbolic_function)(args[0])\r\n  File \"[..]/pandas_ply/symbolic.py\", line 204, in <lambda>\r\n    return lambda *args, **kwargs: obj._eval(dict(enumerate(args), **kwargs))\r\n  File \"[..]/pandas_ply/symbolic.py\", line 142, in _eval\r\n    result = evaled_func(*evaled_args, **evaled_kwargs)\r\n  File \"[..]/dfply/subset.py\", line 55, in mask\r\n    mask = mask & arg\r\n  File \"[..]/pandas/core/ops.py\", line 915, in wrapper\r\n    self, other = _align_method_SERIES(self, other, align_asobject=True)\r\n  File \"[..]/pandas/core/ops.py\", line 629, in _align_method_SERIES\r\n    left, right = left.align(right, copy=False)\r\n  File \"[..]/pandas/core/series.py\", line 2411, in align\r\n    broadcast_axis=broadcast_axis)\r\n  File \"[..]/pandas/core/generic.py\", line 4937, in align\r\n    fill_axis=fill_axis)\r\n  File \"[..]/pandas/core/generic.py\", line 5006, in _align_series\r\n    return_indexers=True)\r\n  File \"[..]/pandas/core/indexes/range.py\", line 441, in join\r\n    sort)\r\n  File \"[..]/pandas/core/indexes/base.py\", line 3024, in join\r\n    return_indexers=return_indexers)\r\n  File \"[..]/pandas/core/indexes/datetimes.py\", line 1069, in join\r\n    return_indexers=return_indexers, sort=sort)\r\n  File \"[..]/pandas/core/indexes/base.py\", line 3033, in join\r\n    return this.join(other, how=how, return_indexers=return_indexers)\r\n  File \"[..]/pandas/core/indexes/base.py\", line 3046, in join\r\n    return_indexers=return_indexers)\r\n  File \"[..]/pandas/core/indexes/base.py\", line 3127, in _join_non_unique\r\n    sort=True)\r\n  File \"[..]/pandas/core/reshape/merge.py\", line 982, in _get_join_indexers\r\n    llab, rlab, shape = map(list, zip(* map(fkeys, left_keys, right_keys)))\r\n  File \"[..]/pandas/core/reshape/merge.py\", line 1412, in _factorize_keys\r\n    llab, rlab = _sort_labels(uniques, llab, rlab)\r\n  File \"[..]/pandas/core/reshape/merge.py\", line 1438, in _sort_labels\r\n    _, new_labels = algos.safe_sort(uniques, labels, na_sentinel=-1)\r\n  File \"[..]/pandas/core/algorithms.py\", line 483, in safe_sort\r\n    ordered = sort_mixed(values)\r\n  File \"[..]/pandas/core/algorithms.py\", line 476, in sort_mixed\r\n    nums = np.sort(values[~str_pos])\r\n  File \"[..]/numpy/core/fromnumeric.py\", line 822, in sort\r\n    a.sort(axis=axis, kind=kind, order=order)\r\n  File \"pandas/_libs/tslib.pyx\", line 1080, in pandas._libs.tslib._Timestamp.__richcmp__ (pandas/_libs/tslib.c:20281)\r\nTypeError: Cannot compare type 'Timestamp' with type 'int'\r\n```\r\n\r\nWhat is the reason? My dataframe looks like\r\n\r\n```\r\n                                                 part_number         type     value\r\ntimestamps                                                                         \r\n2017-08-01 00:00:32.651504  91cb9fa3859f4d44853f6200616db619        power1 -0.001651\r\n2017-08-01 00:00:32.652504  91cb9fa3859f4d44853f6200616db619        power2  0.005068\r\n2017-08-01 00:00:32.653504  91cb9fa3859f4d44853f6200616db619        power1 -0.004536\r\n2017-08-01 00:00:32.654504  91cb9fa3859f4d44853f6200616db619        power2 -0.000084\r\n2017-08-01 00:00:32.655504  5535c560ece9415f8f6ad996f1c23f6e        power1 -0.001114\r\n2017-08-01 00:00:32.656504  5535c560ece9415f8f6ad996f1c23f6e        power2 -0.005621\r\n2017-08-01 00:00:32.657504  5535c560ece9415f8f6ad996f1c23f6e        power1 -0.000638\r\n2017-08-01 00:00:32.658504  5535c560ece9415f8f6ad996f1c23f6e        power2 -0.006916\r\n2017-08-01 00:00:32.659504  5535c560ece9415f8f6ad996f1c23f6e        power1  0.001549\r\n```\r\nwhere the index is DatatimeIndex. I am using dfply version 0.2.4."}}
{"actor":{"display_login":"Make42"}}