Commits

Sergey Astanin  committed af78677

update docstrings and README: record arrays and named tuples

  • Participants
  • Parent commits faa6303

Comments (0)

Files changed (2)

 * list of lists or another iterable of iterables
 * dict of iterables
 * two-dimensional NumPy array
+* NumPy record arrays
 * pandas.DataFrame
 
 Examples in this file use Python2. Tabulate supports Python3 too (Python >= 3.3).
     Bob        19
 
 
-If ``headers="keys"``, then the keys of a dictionary/dataframe,
-or column indices are used::
+If ``headers="keys"``, then the keys of a dictionary/dataframe, or
+column indices are used. It also works for NumPy record arrays and
+lists of named tuples::
 
     >>> print tabulate({"Name": ["Alice", "Bob"],
     ...                 "Age": [24, 19]}, headers="keys")
 Version history
 ---------------
 
+- 0.7: WORK IN PROGRESS: ``latex`` tables. Printing lists of named tuples and NumPy record arrays. Fix printing date and time values.
 - 0.6: ``mediawiki`` tables, bug fixes
 - 0.5.1: Fix README.rst formatting. Optimize (performance similar to 0.4.4).
 - 0.5: ANSI color sequences. Printing dicts of iterables and Pandas' dataframes.
 
     * list-of-lists or another iterable of iterables
 
+    * list of named tuples (usually used with headers="keys")
+
     * 2D NumPy arrays
 
+    * NumPy record arrays (usually used with headers="keys")
+
     * dict of iterables (usually used with headers="keys")
 
     * pandas.DataFrame (usually used with headers="keys")
     ---  ---------
 
     The first required argument (`tabular_data`) can be a
-    list-of-lists (or another iterable or iterables), a dictionary of
-    iterables, a two-dimensional NumPy array, or a Pandas' dataframe.
+    list-of-lists (or another iterable of iterables), a list of named
+    tuples, a dictionary of iterables, a two-dimensional NumPy array,
+    NumPy record array, or a Pandas' dataframe.
 
 
     Table headers
     | spam || align="right"| 23
     |}
 
-
     """
 
     list_of_lists, headers = _normalize_tabular_data(tabular_data, headers)