Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Merged
Changes from 1 commit
Commits
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
privatize iotools.srml.format_index and map_columns
  • Loading branch information
kandersolar committed Jun 12, 2023
commit 16a97be15ab662d386243b483c7ecf95dfeb010b
8 changes: 4 additions & 4 deletions 8 pvlib/iotools/srml.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,11 @@ def read_srml(filename):
`http://solardat.uoregon.edu/ <http://solardat.uoregon.edu/>`_
"""
tsv_data = pd.read_csv(filename, delimiter='\t')
data = format_index(tsv_data)
data = _format_index(tsv_data)
# Drop day of year and time columns
data = data[data.columns[2:]]

data = data.rename(columns=map_columns)
data = data.rename(columns=_map_columns)

# Quality flag columns are all labeled 0 in the original data. They
# appear immediately after their associated variable and are suffixed
Expand All @@ -90,7 +90,7 @@ def read_srml(filename):
return data


def map_columns(col):
def _map_columns(col):
"""Map data element numbers to pvlib names.

Parameters
Expand Down Expand Up @@ -118,7 +118,7 @@ def map_columns(col):
return col


def format_index(df):
def _format_index(df):
"""Create a datetime index from day of year, and time columns.

Parameters
Expand Down
Morty Proxy This is a proxified and sanitized view of the page, visit original site.