BUG: #47350 if else added to add NaT for missing time values
State: closed

If else added to add NaT rows for missing time values.

Labels:
name: Datetime
description: Datetime data dtype
name: Missing-data
description: np.nan, pd.NaT, pd.NA, dropna, isnull, interpolate

Comments:
> not really sure what you are trying to fix. please add a relevant test that fails w/o a change.

Hi, I tried to fix bug #47350. Would you explain more about `relevant test that fails w/o a change.` I checked the code to return relevant results but some check failed during merge.
Please review https://pandas.pydata.org/pandas-docs/stable/development/contributing_codebase.html#contributing-to-the-code-base for instructions on how to submit a pull request so that the team understands the changes
> Please review https://pandas.pydata.org/pandas-docs/stable/development/contributing_codebase.html#contributing-to-the-code-base for instructions on how to submit a pull request so that the team understands the changes

I checked most of the rules in the link. I don't know why most of the Ubuntu, windows and macos get error? Should I compile with any special parameters? Any idea @mroeschke @jreback 
From the logs, it appears your code change broke existing unit tests

https://github.com/pandas-dev/pandas/runs/7309922086?check_suite_focus=true
@mroeschke @jreback `32 Bit Linux / pytest (pull_request)` action raise error for test: `FAILED pandas/tests/groupby/test_apply.py::test_group_apply_once_per_group[GH2936]`. The error in 'test_group_apply_once_per_group' is that `AttributeError: 'DataFrame' object has no attribute 'name'`. What should I do with this test? I think `dataframe.groupby` `name` property belongs to old versions. This error in this test, prevents CI/CD tests to commit.
Ideally all tests should still be passing even when the code fix is made. 
take
> Ideally all tests should still be passing even when the code fix is made.

Thank you. Because this is my first pull request and first time all tests past, how much does it take to be accepted?
@mroeschke One question about the review. Should I make these changes in my local and commit and make a new pull request? Or it just will be applied automatically after review finished? Sorry for lack of experience and asking dummy questions.
You can just push your changes to the same pull request as Github will show the code changes relative to the latest commit.

You can read more about a successful pull request in:
https://pandas.pydata.org/pandas-docs/stable/development/contributing.html
https://pandas.pydata.org/pandas-docs/stable/development/contributing_codebase.html

Generally, any code changes made should only relate to fixing #47350. Unrelated code changes makes a pull request harder to review 
> > not really sure what you are trying to fix. please add a relevant test that fails w/o a change.
> 
> Hi, I tried to fix bug #47350. Would you explain more about `relevant test that fails w/o a change.` I checked the code to return relevant results but some check failed during merge.

Test added in d586077e26dd13dbb6d9a82ccae0b7cfaf980384
> 


@mroeschke Ok. I will revert all tests that I ignored and commit again.
@mroeschke Irrelevant codes reverted.
Appears you will need to merge in the main branch too.
Thanks for the pull request, but it appears to have gone stale. If interested in continuing, please merge in the main branch, address any review comments and/or failing tests, and we can reopen.
Thank you, I would like to continue working on this bug. I was busy recently, but now really this bug is food for thought for me. I want to start working on it again.
Thank you for reopening. 
Thanks for the pull request, but it appears to have gone stale. If interested in continuing, please merge in the main branch, address any review comments and/or failing tests, and we can reopen.