diff --git a/pandasai/connectors/base.py b/pandasai/connectors/base.py index c381385bc..130ead094 100644 --- a/pandasai/connectors/base.py +++ b/pandasai/connectors/base.py @@ -74,14 +74,14 @@ def _load_connector_config(self, config: BaseConnectorConfig): Returns: _type_: BaseConnectorConfig """ - raise NotImplementedError + pass @abstractmethod def _init_connection(self, config: BaseConnectorConfig): """ make connection to database """ - raise NotImplementedError + pass @abstractmethod def head(self): diff --git a/pandasai/connectors/yahoo_finance.py b/pandasai/connectors/yahoo_finance.py index 52d39ea70..cae4e263d 100644 --- a/pandasai/connectors/yahoo_finance.py +++ b/pandasai/connectors/yahoo_finance.py @@ -1,6 +1,5 @@ import os import pandas as pd -from sqlalchemy import create_engine from .base import YahooFinanceConnectorConfig, BaseConnector import time @@ -35,25 +34,6 @@ def __init__(self, stock_ticker, where=None, cache_interval: int = 600): super().__init__(yahoo_finance_config) self.ticker = yfinance.Ticker(self._config.table) - def _load_connector_config(self, config: YahooFinanceConnectorConfig): - """ - Loads passed Configuration to object - - Args: - config (BaseConnectorConfig): Construct config in structure - - """ - return YahooFinanceConnectorConfig(**config) - - def _init_connection(self, config: YahooFinanceConnectorConfig): - - self._engine = create_engine( - f"{config.dialect}://{config.username}:{config.password}@{config.host}" - f":{str(config.port)}/{config.database}" - ) - - self._connection = self._engine.connect() - def head(self): """ Return the head of the data source that the connector is connected to.