spreadsheet
autocorpus.spreadsheet
¤
Module for extracting and converting spreadsheet content into BioC tables.
Attributes¤
Classes¤
Functions¤
convert_datetime_to_string(df)
¤
Convert all datetime objects in a DataFrame to string format.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
df
|
DataFrame
|
The input DataFrame. |
required |
Returns:
Name | Type | Description |
---|---|---|
DataFrame |
DataFrame
|
A DataFrame with datetime columns converted to string. |
Source code in autocorpus/spreadsheet.py
13 14 15 16 17 18 19 20 21 22 23 24 25 |
|
extract_spreadsheet_content(filename)
¤
Process an Excel file and extract each sheet as a separate table.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
filename
|
Path
|
The path of the Excel file to be processed. |
required |
Returns:
Type | Description |
---|---|
BioCTableCollection | None
|
A list of tables, where each table is represented as a Pandas DataFrame. |
Raises:
Type | Description |
---|---|
Exception
|
If there is an error while processing the Excel file. |
Source code in autocorpus/spreadsheet.py
28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 |
|