Skip to content

feat: Support bigframes.pandas.to_datetime for scalars, iterables and series. #372

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 34 commits into from
Feb 12, 2024
Merged
Changes from 1 commit
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
6eefb40
feat: Support pd.to_datetime for scalars, iterables and series.
Genesis929 Feb 6, 2024
033e338
update test and docstring
Genesis929 Feb 6, 2024
e4feb09
update types
Genesis929 Feb 6, 2024
35f14f5
format update
Genesis929 Feb 6, 2024
22ede7d
remove import.
Genesis929 Feb 6, 2024
af274cb
update docstring
Genesis929 Feb 6, 2024
fe955db
update arg conversion
Genesis929 Feb 6, 2024
8c1f633
update examples
Genesis929 Feb 7, 2024
637ca21
update format
Genesis929 Feb 7, 2024
23fbf15
update code examples, and working logic.
Genesis929 Feb 7, 2024
c6d254d
docstring update.
Genesis929 Feb 7, 2024
0692c79
type update.
Genesis929 Feb 7, 2024
f436149
format update.
Genesis929 Feb 7, 2024
87d1749
Update docstring format
Genesis929 Feb 7, 2024
b180fe3
remove import
Genesis929 Feb 8, 2024
3f0f7db
remove empty line
Genesis929 Feb 8, 2024
dc6cfcd
Remove extra code
Genesis929 Feb 8, 2024
68ec37e
remove prints.
Genesis929 Feb 8, 2024
8b8d61a
Code logic updates.
Genesis929 Feb 9, 2024
5e5842b
Add constants.
Genesis929 Feb 9, 2024
d4a71b0
Update comments
Genesis929 Feb 9, 2024
e0d1f8c
Move datetime helpers to the end of file.
Genesis929 Feb 9, 2024
d0db699
Update helper
Genesis929 Feb 9, 2024
958ca00
update format
Genesis929 Feb 9, 2024
6ef47fb
String process logic updated.
Genesis929 Feb 9, 2024
a08ea2e
update import
Genesis929 Feb 9, 2024
6732fd9
remove print
Genesis929 Feb 9, 2024
097ca77
Merge branch 'main' into huanc-to_datetime
Genesis929 Feb 9, 2024
7c54aaa
update docstring
Genesis929 Feb 9, 2024
1b68883
update docstring
Genesis929 Feb 9, 2024
7057758
update docstring
Genesis929 Feb 9, 2024
22abed0
update note
Genesis929 Feb 9, 2024
a4e981b
update docstring
Genesis929 Feb 9, 2024
24347a2
Update code examples
Genesis929 Feb 9, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
update arg conversion
  • Loading branch information
Genesis929 committed Feb 6, 2024
commit fe955dbb03b7776085a2faf06bae2b476de1650e
3 changes: 1 addition & 2 deletions bigframes/core/tools/datetimes.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,7 @@ def to_datetime(
# the upload process to utilize the BigPandas DataFrame constructor directly
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
# the upload process to utilize the BigPandas DataFrame constructor directly
# the upload process to utilize the BigQuery DataFrame constructor directly

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done.

# once it is enhanced for more related datatypes.
arg = global_session.with_default_session(
bigframes.session.Session.read_pandas,
arg if isinstance(arg, pd.Series) else pd.DataFrame(arg),
bigframes.session.Session.read_pandas, pd.DataFrame(arg)
)

if len(arg.columns) != 1:
Expand Down