make pandas an optional dependency in lancedb as well (#385)

This commit is contained in:
Chang She
2023-07-31 14:08:58 -04:00
committed by GitHub
parent cada35d5b7
commit c1f8feb6ed
10 changed files with 45 additions and 34 deletions

View File

@@ -16,9 +16,8 @@ from __future__ import annotations
import os
from abc import ABC, abstractmethod
from pathlib import Path
from typing import Dict, Iterable, List, Optional, Tuple, Union
from typing import Optional
import pandas as pd
import pyarrow as pa
from pyarrow import fs
@@ -39,9 +38,7 @@ class DBConnection(ABC):
def create_table(
self,
name: str,
data: Optional[
Union[List[dict], dict, pd.DataFrame, pa.Table, Iterable[pa.RecordBatch]],
] = None,
data: Optional[DATA] = None,
schema: Optional[pa.Schema] = None,
mode: str = "create",
on_bad_vectors: str = "error",