brightwind.load.load.load_campbell_scientific¶
-
brightwind.load.load.
load_campbell_scientific
(filepath_or_folder, print_progress=True, **kwargs)¶ Load timeseries data from Campbell Scientific CR1000 formatted file, or group of files in a folder, into a DataFrame. If the file format is slightly different your own key word arguments can be sent as this is a wrapper around the pandas.read_csv function. The pandas.read_csv documentation can be found at: https://pandas.pydata.org/pandas-docs/stable/generated/pandas.read_csv.html
- Parameters
- Returns
A DataFrame with timestamps as it’s index
- Return type
pandas.DataFrame
When assembling files from folders into a single DataFrame with timestamp as the index it automatically checks for duplicates and throws an error if any found.
Example usage
import brightwind as bw filepath = r'C:\some\folder\some_CR1000_data.csv' df = bw.load_campbell_scientific(filepath) print(df)
To load a group of files from a folder:
folder = r'C:\some\folder\with\CR1000\files' df = bw.load_campbell_scientific(folder, print_progress=True)