toSeries method
Converts this DataFrame to a Series.
Extracts the first column as a Series.
Throws ArgumentError if the DataFrame is empty.
Implementation
Series toSeries() {
if (columnCount == 0) {
throw ArgumentError('Cannot convert empty DataFrame to Series');
}
return this[columns[0]];
}