IAP GITLAB

Skip to content
Snippets Groups Projects
Commit 95688419 authored by Remy Prechelt's avatar Remy Prechelt
Browse files

Make pandas the default file format and cleanup library.

parent a4f8f2c5
No related branches found
No related tags found
No related merge requests found
......@@ -179,9 +179,6 @@ class Library(object):
# type from the proccesses subdirectory
try:
# create the name of the module containing this output class
# module_name = re.sub(r"(?<!^)(?=[A-Z])", "_", out_type).lower()
# instantiate the output and store it in our dict
component = getattr(outputs, out_type)(op.join(path, subdir))
......
......@@ -55,7 +55,7 @@ class ObservationPlane(Output):
"""
return self.__data is not None and self.__config is not None
def astype(self, dtype: str = "parquet", **kwargs: Any) -> Any:
def astype(self, dtype: str = "pandas", **kwargs: Any) -> Any:
"""
Load the particle data from this observation plane.
......@@ -71,7 +71,7 @@ class ObservationPlane(Output):
Any:
The return type of this method is determined by `dtype`.
"""
if dtype == "parquet":
if dtype == "arrow":
return self.__data
elif dtype == "pandas":
return self.__data.to_pandas()
......@@ -79,7 +79,7 @@ class ObservationPlane(Output):
raise ValueError(
(
f"Unknown format '{dtype}' for ObservationPlane. "
"We currently only support ['parquet', 'pandas']."
"We currently only support ['arrow', 'pandas']."
)
)
......@@ -97,3 +97,9 @@ class ObservationPlane(Output):
The configuration file for this output.
"""
return self.__config
def __repr__(self) -> str:
"""
Return a string representation of this class.
"""
return f"ObservationPlane('{self.config['name']}')"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment