Feat: callback to toggle editing
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
from .stage import AbstractStage
|
||||
from pathlib import Path
|
||||
import pandas as pd
|
||||
|
||||
class FSStage(AbstractStage):
|
||||
def __init__(self, name, basepath, metadata_engine=None):
|
||||
@@ -40,9 +41,16 @@ class FSStage(AbstractStage):
|
||||
table_path = self.build_table_path(table, schema)
|
||||
pass
|
||||
|
||||
def read(self, table:str, schema:str='.'):
|
||||
def read(self, table:str, schema:str='.', read_options={}):
|
||||
table_path = self.build_table_path(table, schema)
|
||||
pass
|
||||
extension = table_path.suffix
|
||||
if extension == '.csv':
|
||||
return pd.read_csv(table_path, **read_options)
|
||||
|
||||
if extension == '.xlsx':
|
||||
return pd.read_excel(table_path, **read_options)
|
||||
|
||||
raise ValueError("Can't open the table")
|
||||
|
||||
def write(self, table:str, content, schema:str='.'):
|
||||
table_path = self.build_table_path(table, schema)
|
||||
|
||||
Reference in New Issue
Block a user