{"action":"created","issue":{"url":"https://api.github.com/repos/pydata/pandas/issues/11123","labels_url":"https://api.github.com/repos/pydata/pandas/issues/11123/labels{/name}","comments_url":"https://api.github.com/repos/pydata/pandas/issues/11123/comments","events_url":"https://api.github.com/repos/pydata/pandas/issues/11123/events","html_url":"https://github.com/pydata/pandas/issues/11123","id":106755780,"number":11123,"title":"Business day resampling ","user":{"login":"0x0L","id":3621629,"avatar_url":"https://avatars.githubusercontent.com/u/3621629?v=3","gravatar_id":"","url":"https://api.github.com/users/0x0L","html_url":"https://github.com/0x0L","followers_url":"https://api.github.com/users/0x0L/followers","following_url":"https://api.github.com/users/0x0L/following{/other_user}","gists_url":"https://api.github.com/users/0x0L/gists{/gist_id}","starred_url":"https://api.github.com/users/0x0L/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/0x0L/subscriptions","organizations_url":"https://api.github.com/users/0x0L/orgs","repos_url":"https://api.github.com/users/0x0L/repos","events_url":"https://api.github.com/users/0x0L/events{/privacy}","received_events_url":"https://api.github.com/users/0x0L/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/pydata/pandas/labels/Difficulty%20Intermediate","name":"Difficulty Intermediate","color":"fbca04"},{"url":"https://api.github.com/repos/pydata/pandas/labels/Effort%20Medium","name":"Effort Medium","color":"006b75"},{"url":"https://api.github.com/repos/pydata/pandas/labels/Enhancement","name":"Enhancement","color":"4E9A06"},{"url":"https://api.github.com/repos/pydata/pandas/labels/Frequency","name":"Frequency","color":"0052cc"},{"url":"https://api.github.com/repos/pydata/pandas/labels/Resample","name":"Resample","color":"207de5"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/pydata/pandas/milestones/32","html_url":"https://github.com/pydata/pandas/milestones/Next%20Major%20Release","labels_url":"https://api.github.com/repos/pydata/pandas/milestones/32/labels","id":933188,"number":32,"title":"Next Major Release","description":"after 0.16.1 of course","creator":{"login":"jreback","id":953992,"avatar_url":"https://avatars.githubusercontent.com/u/953992?v=3","gravatar_id":"","url":"https://api.github.com/users/jreback","html_url":"https://github.com/jreback","followers_url":"https://api.github.com/users/jreback/followers","following_url":"https://api.github.com/users/jreback/following{/other_user}","gists_url":"https://api.github.com/users/jreback/gists{/gist_id}","starred_url":"https://api.github.com/users/jreback/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jreback/subscriptions","organizations_url":"https://api.github.com/users/jreback/orgs","repos_url":"https://api.github.com/users/jreback/repos","events_url":"https://api.github.com/users/jreback/events{/privacy}","received_events_url":"https://api.github.com/users/jreback/received_events","type":"User","site_admin":false},"open_issues":910,"closed_issues":73,"state":"open","created_at":"2015-01-13T10:53:19Z","updated_at":"2015-10-05T11:19:43Z","due_on":"2016-01-31T05:00:00Z","closed_at":null},"comments":9,"created_at":"2015-09-16T11:42:39Z","updated_at":"2015-10-05T14:47:45Z","closed_at":null,"body":"Hi everyone, \r\n\r\nI just stumbled across this odd behaviour: \r\n\r\nFor a daily time series, I would expect `resample('B',  how='last')` to be equivalent to selecting rows whose weekday is not Saturday or Sunday.  However, `resample` groups together Fridays,  Saturdays and Sundays and hence we get Sunday's value on Friday.\r\n\r\nIn the time series context, I guess most people would expect `resample('B', ...)` to bin Saturdays, Sundays and Mondays, so that **no looking into the future** occurs.\r\n\r\nAm I missing something? "},"comment":{"url":"https://api.github.com/repos/pydata/pandas/issues/comments/145553991","html_url":"https://github.com/pydata/pandas/issues/11123#issuecomment-145553991","issue_url":"https://api.github.com/repos/pydata/pandas/issues/11123","id":145553991,"user":{"login":"0x0L","id":3621629,"avatar_url":"https://avatars.githubusercontent.com/u/3621629?v=3","gravatar_id":"","url":"https://api.github.com/users/0x0L","html_url":"https://github.com/0x0L","followers_url":"https://api.github.com/users/0x0L/followers","following_url":"https://api.github.com/users/0x0L/following{/other_user}","gists_url":"https://api.github.com/users/0x0L/gists{/gist_id}","starred_url":"https://api.github.com/users/0x0L/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/0x0L/subscriptions","organizations_url":"https://api.github.com/users/0x0L/orgs","repos_url":"https://api.github.com/users/0x0L/repos","events_url":"https://api.github.com/users/0x0L/events{/privacy}","received_events_url":"https://api.github.com/users/0x0L/received_events","type":"User","site_admin":false},"created_at":"2015-10-05T14:47:45Z","updated_at":"2015-10-05T14:47:45Z","body":"I understand. That's what I was trying to say when I earlier mentioned we could use the convention keyword arg.\r\nRight now,\r\n\r\n```python\r\nIn [10]: x = s2.resample('B', how='last', convention='start')\r\n\r\nIn [11]: y = s2.resample('B', how='last', convention='end')\r\n```\r\n\r\nare the same. Why note use convention='end' to make it group sat-sun-mon ?"}}