Instantiate TimeSeries from a csv file
#1163
Draft
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.
WindRoseandWindTIRosehave capabilities of reading data from CSVs using their own (static)read_csv_long()methods. However, theTimeSeriesclass, until now, has not supported such functionality. This PR adds a new static methodread_csv()to theTimeSeriesclass to enable such functionality.To be discussed:
TimeSeries.read_csv()allows users to specify avalue_col, whereasWindRose.read_csv_long()andWindTIRose.read_csv_long()do not support reading in avalue_col. Do we want to add this optional keyword arguments toWindRose.read_csv_long()andWindTIRose.read_csv_long()?TimeSeries.read_csv()rather thanTimeSeries.read_csv_long()because I think the "long" format is implied by the "series" nature of the class. However, we could useread_csv_longinstead to match the other wind data classes.WindDataclasses have ato_csv()method, but this also seems like a natural counterpart. We could consider adding one forTimeSeriesand possibly alsoWindRoseandWindTIRoseTagging @paulf81 , @ejsimley in case they have thoughts on this.