-
Notifications
You must be signed in to change notification settings - Fork 9
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
Remove pandas dependency by decoupling csv writing from dataframes #176
Merged
Merged
Changes from 25 commits
Commits
Show all changes
28 commits
Select commit
Hold shift + click to select a range
3c3ee1b
Remove experiment app run files
machallboyd 14cd54b
[#164] Start a boilerplate csv writer
machallboyd 91dd683
[#164] refactor unused(?) get_events function
machallboyd 2847878
[#164] put hive_cosim back
machallboyd 7d9e83d
[#164] convert time_step_stats_handler to no pandas
machallboyd 1cbde3f
[#164] remove vehicle charge pandas import
machallboyd d0b6a1f
[#164] strip out more reporting python
machallboyd a18a845
[#164] Fix return of time step data
machallboyd 32ea944
[#164] Polymorphism for to_csv
machallboyd 5bbb6e8
[#164] Correct docstrings to reflect lack of pandas
machallboyd 3443d40
[#164] Correct type hints
machallboyd 9399c00
[#164] Use Sequence instead of list for type hint
machallboyd 1b254a6
[#164] Simplify test to satisfy mypy
machallboyd 88a5e1d
[#164] Another stab at sorting out types
machallboyd b35ea19
[#164] Type hints: data for tabular format can be empty
machallboyd 1bcf3a3
[#164] Type hints: interstitial commit
machallboyd 9c53543
[#164] Type hints: Better express empty sequences
machallboyd 0475d7c
Merge branch 'main' into feature/ditch-pandas
machallboyd 4d87af2
[#164] Type hints: Another stab and fixing it
machallboyd 6e59ed7
[#164] Drastically cut down on the specificity of type hints
machallboyd 388c59e
[#164] Correct for Optional
machallboyd 4e9c2dc
[#164] Back to 3.8 style for type hint
machallboyd a0fae6f
[#164] Remove unused imports
machallboyd 703e77a
Black reformat
machallboyd 7281ec4
Correct import for 3.8 hinting
machallboyd 002d680
add run_batch back in
nreinicke 1766148
Merge branch 'main' into feature/ditch-pandas
nreinicke 94e1cd1
Merge branch 'main' into feature/ditch-pandas
nreinicke File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import csv | ||
import pathlib | ||
from typing import Sequence | ||
|
||
|
||
def to_csv(data: Sequence[Sequence[str]], path: pathlib.Path): | ||
with open(path, "w") as f: | ||
writer = csv.writer(f) | ||
writer.writerows(data) | ||
|
||
|
||
def to_csv_dicts(data: Sequence[dict], path: pathlib.Path): | ||
with open(path, "w") as f: | ||
writer = csv.DictWriter(f, fieldnames=data[0].keys()) | ||
writer.writeheader() | ||
writer.writerows(data) |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
I think we want to bring this back since we supply a command line tool that uses it:
hive/pyproject.toml
Line 60 in a15b8ba
But, this doesn't use pandas so hopefully that's a trivial ask.