-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
BUG: #47350 if else added to add NaT for missing time values #47647
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
aa9f8c7
5d75134
2987981
952f74e
541ec70
18e02b4
d586077
c4025dc
ff0734d
702c586
6716cfc
4645cd4
4815b5e
f95a2e4
da61402
a8da21b
f94e812
dc40ce1
57cb1c6
cf8af3f
4c3bb61
bed87fb
4766327
e9d50b0
9877034
26b24f2
0ea81fd
dbee98a
80ede97
7456a26
22f1166
a9ce0c2
fc96625
cdda71f
8519f66
32c1a74
70a9433
a402371
df2f37d
9b89614
fb06399
3d1951f
fc8c00a
24d9cd4
d8d18e8
f050fda
2b57e4d
3335cfd
2bc6a29
fdb123f
8777790
ffd5b55
c5ae12f
df958ce
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -821,14 +821,37 @@ def apply( | |
# This calls DataSplitter.__iter__ | ||
zipped = zip(group_keys, splitter) | ||
|
||
i = 0 | ||
for key, group in zipped: | ||
# BUG:47350 if replaced 1 by hamedgibago | ||
# if key not in data.index and is_datetime64_any_dtype(data.index): | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is this comments or old code? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, I have to remove this comment for my old code too. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Looks like this old code is still here |
||
# #or (key not in data.index and f.__name__ in ['idxmax','idxmin']) : | ||
# ser=Series(i,[key]) | ||
# res = None | ||
# else: | ||
# res = f(group) | ||
try: | ||
res = f(group) | ||
except (ValueError, AttributeError): | ||
# except ValueError: | ||
res = None | ||
|
||
object.__setattr__(group, "name", key) | ||
|
||
# group might be modified | ||
group_axes = group.axes | ||
res = f(group) | ||
|
||
if not mutated and not _is_indexed_like(res, group_axes, axis): | ||
mutated = True | ||
|
||
i = i + 1 | ||
|
||
# BUG:47350 if added by hamedgibago | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Looks unused? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, I have to remove it too. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same here |
||
# if key in data.index: | ||
# result_values.append(res) | ||
# else: | ||
# result_values.append(np.nan) | ||
|
||
result_values.append(res) | ||
|
||
# getattr pattern for __name__ is needed for functools.partial objects | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This
i
variable doesn't look to be used anywhereThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have to remove it, it was created for my old code.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here