Skip to content

for #392 #403

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

Merged
merged 7 commits into from
Oct 31, 2022
Merged

for #392 #403

merged 7 commits into from
Oct 31, 2022

Conversation

ramvikrams
Copy link
Contributor

added dict

  • Closes #xxxx (Replace xxxx with the Github issue number)
  • Tests added: Please use assert_type() to assert the type of any return value

Copy link
Collaborator

@Dr-Irv Dr-Irv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you add a test for this. You can use the example from #392

@ramvikrams
Copy link
Contributor Author

added the tests sir

Copy link
Collaborator

@Dr-Irv Dr-Irv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CI is failing because you have to run black on the source.

@@ -1915,3 +1915,8 @@ def f(s: pd.DataFrame) -> pd.Series:
return s.mean()

check(assert_type(resampler.apply(f), Union[pd.Series, pd.DataFrame]), pd.DataFrame)


def df_accepting_dicts_iterator() -> None:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add a comment here to reference the original issue, i..e., # GH 392

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done sir

@@ -1915,3 +1915,8 @@ def f(s: pd.DataFrame) -> pd.Series:
return s.mean()

check(assert_type(resampler.apply(f), Union[pd.Series, pd.DataFrame]), pd.DataFrame)


def df_accepting_dicts_iterator() -> None: # GH 392
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please put this comment on its own line (see elsewhere for examples of this)

You also have extra spaces on the two lines above. Make sure you run black on your files before you commit.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done and ran black

def df_accepting_dicts_iterator() -> None:
# GH 392
data = [{"a": 1, "b": 2}, {"a": 3, "b": 5}]
p = pd.DataFrame(iter(data))
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One more thing. Can you change this last line to:

    check(assert_type(pd.DataFrame(iter(data)), pd.DataFrame), pd.DataFrame)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@@ -1915,3 +1915,9 @@ def f(s: pd.DataFrame) -> pd.Series:
return s.mean()

check(assert_type(resampler.apply(f), Union[pd.Series, pd.DataFrame]), pd.DataFrame)


def df_accepting_dicts_iterator() -> None:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You have to make sure you run black before committing. You have an extra space at the end of this line.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done Sir

Copy link
Collaborator

@Dr-Irv Dr-Irv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks @ramvikrams

@Dr-Irv Dr-Irv merged commit 356ed09 into pandas-dev:main Oct 31, 2022
@ramvikrams
Copy link
Contributor Author

thanks @ramvikrams

Welcome sir you helped a lot

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants