Skip to content

Commit

Permalink
fixes issue with primary and secondary timeseries reading.
Browse files Browse the repository at this point in the history
  • Loading branch information
mgdenno committed Oct 8, 2024
1 parent 964b6ca commit 7a5ebb9
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions src/teehr/evaluation/tables.py
Original file line number Diff line number Diff line change
Expand Up @@ -949,6 +949,14 @@ def __init__(self, eval):
if not self._dir_is_emtpy():
self._read_spark_df()

def _read_spark_df(self, format: str = "parquet"):
"""Read data from directory as a spark dataframe."""
self.df = (
self.spark.read.format(format)
.option("header", True)
.load(str(self.dir))
)

def _load(
self,
in_path: Union[Path, str],
Expand Down Expand Up @@ -1169,6 +1177,14 @@ def __init__(self, eval):
if not self._dir_is_emtpy():
self._read_spark_df()

def _read_spark_df(self, format: str = "parquet"):
"""Read data from directory as a spark dataframe."""
self.df = (
self.spark.read.format(format)
.option("header", True)
.load(str(self.dir))
)

def _load(
self,
in_path: Union[Path, str],
Expand Down

0 comments on commit 7a5ebb9

Please sign in to comment.