chatbot_image_demo / utils /metadata.py
Naifeng Zhang
init
060afd2
raw
history blame contribute delete
482 Bytes
import pandas as pd
def read_metadta(file_path):
last_6_columns = [
"Data creation year",
"Data creation month",
"Data creation day",
"Specimen collection year",
"Specimen collection month",
"Specimen collection day"
]
# Create a dtype dictionary to set the last 6 columns as strings
dtype_dict = {col: str for col in last_6_columns}
metadata_df = pd.read_csv(file_path, dtype=dtype_dict)
return metadata_df