Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions AUTHORS.rst
Original file line number Diff line number Diff line change
Expand Up @@ -53,3 +53,4 @@ agate is made by a community. The following individuals have contributed code, d
* `Karthik Ramadugu <https://github.com/karthiksai109>`__
* `Josh Renaud <https://github.com/Kirkman>`__
* `Vincent Gao <https://github.com/gaoflow>`__
* `Sanjay Santhanam <https://github.com/Sanjays2402>`__
1 change: 1 addition & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

- fix: :meth:`.Table.distinct` now deduplicates rows when ``key`` is a sequence of column names.
- fix: :class:`.Rank` ranks null values last when ``reverse=True``.
- fix: :meth:`.Table.from_fixed` reads the schema instead of the data file when ``schema_path`` is a file-like object.

1.14.2 - February 27, 2026
--------------------------
Expand Down
2 changes: 1 addition & 1 deletion agate/table/from_fixed.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ def from_fixed(cls, path, schema_path, column_names=utils.default, column_types=
schema_f = open(schema_path, encoding=schema_encoding)
close_schema_f = True
else:
schema_f = path
schema_f = schema_path

reader = fixed.reader(f, schema_f)
rows = list(reader)
Expand Down
12 changes: 12 additions & 0 deletions tests/test_table/test_from_fixed.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,15 @@ def test_from_fixed(self):
self.assertColumnTypes(table2, [type(c) for c in table1.column_types])

self.assertRows(table2, table1.rows)

def test_from_fixed_file_like_objects(self):
table1 = Table.from_csv('examples/testfixed_converted.csv')

with open('examples/testfixed', encoding='utf-8') as f, \
open('examples/testfixed_schema.csv', encoding='utf-8') as schema_f:
table2 = Table.from_fixed(f, schema_f)

self.assertColumnNames(table2, table1.column_names)
self.assertColumnTypes(table2, [type(c) for c in table1.column_types])

self.assertRows(table2, table1.rows)
Loading