added "Returns" to help
This commit is contained in:
parent
94b10b0621
commit
7cbc69a4ca
|
@ -189,6 +189,11 @@ class Table:
|
||||||
label : str
|
label : str
|
||||||
Column label.
|
Column label.
|
||||||
|
|
||||||
|
Returns
|
||||||
|
-------
|
||||||
|
data : numpy.ndarray
|
||||||
|
Array of column data.
|
||||||
|
|
||||||
"""
|
"""
|
||||||
if re.match(r'[0-9]*?_',label):
|
if re.match(r'[0-9]*?_',label):
|
||||||
idx,key = label.split('_',1)
|
idx,key = label.split('_',1)
|
||||||
|
@ -212,6 +217,11 @@ class Table:
|
||||||
info : str, optional
|
info : str, optional
|
||||||
Human-readable information about the new data.
|
Human-readable information about the new data.
|
||||||
|
|
||||||
|
Returns
|
||||||
|
-------
|
||||||
|
table : Table
|
||||||
|
Updated table.
|
||||||
|
|
||||||
"""
|
"""
|
||||||
dup = self.copy()
|
dup = self.copy()
|
||||||
dup._add_comment(label,data.shape[1:],info)
|
dup._add_comment(label,data.shape[1:],info)
|
||||||
|
@ -238,6 +248,11 @@ class Table:
|
||||||
info : str, optional
|
info : str, optional
|
||||||
Human-readable information about the modified data.
|
Human-readable information about the modified data.
|
||||||
|
|
||||||
|
Returns
|
||||||
|
-------
|
||||||
|
table : Table
|
||||||
|
Updated table.
|
||||||
|
|
||||||
"""
|
"""
|
||||||
dup = self.copy()
|
dup = self.copy()
|
||||||
dup._add_comment(label,data.shape[1:],info)
|
dup._add_comment(label,data.shape[1:],info)
|
||||||
|
@ -261,6 +276,11 @@ class Table:
|
||||||
label : str
|
label : str
|
||||||
Column label.
|
Column label.
|
||||||
|
|
||||||
|
Returns
|
||||||
|
-------
|
||||||
|
table : Table
|
||||||
|
Updated table.
|
||||||
|
|
||||||
"""
|
"""
|
||||||
dup = self.copy()
|
dup = self.copy()
|
||||||
dup.data.drop(columns=label,inplace=True)
|
dup.data.drop(columns=label,inplace=True)
|
||||||
|
@ -279,6 +299,11 @@ class Table:
|
||||||
label_new : str or iterable of str
|
label_new : str or iterable of str
|
||||||
New column label(s).
|
New column label(s).
|
||||||
|
|
||||||
|
Returns
|
||||||
|
-------
|
||||||
|
table : Table
|
||||||
|
Updated table.
|
||||||
|
|
||||||
"""
|
"""
|
||||||
dup = self.copy()
|
dup = self.copy()
|
||||||
columns = dict(zip([old] if isinstance(old,str) else old,
|
columns = dict(zip([old] if isinstance(old,str) else old,
|
||||||
|
@ -300,6 +325,11 @@ class Table:
|
||||||
ascending : bool or list, optional
|
ascending : bool or list, optional
|
||||||
Set sort order.
|
Set sort order.
|
||||||
|
|
||||||
|
Returns
|
||||||
|
-------
|
||||||
|
table : Table
|
||||||
|
Updated table.
|
||||||
|
|
||||||
"""
|
"""
|
||||||
dup = self.copy()
|
dup = self.copy()
|
||||||
dup._label_discrete()
|
dup._label_discrete()
|
||||||
|
@ -320,6 +350,11 @@ class Table:
|
||||||
other : Table
|
other : Table
|
||||||
Table to append.
|
Table to append.
|
||||||
|
|
||||||
|
Returns
|
||||||
|
-------
|
||||||
|
table : Table
|
||||||
|
Concatenated table.
|
||||||
|
|
||||||
"""
|
"""
|
||||||
if self.shapes != other.shapes or not self.data.columns.equals(other.data.columns):
|
if self.shapes != other.shapes or not self.data.columns.equals(other.data.columns):
|
||||||
raise KeyError('Labels or shapes or order do not match')
|
raise KeyError('Labels or shapes or order do not match')
|
||||||
|
@ -340,6 +375,10 @@ class Table:
|
||||||
other : Table
|
other : Table
|
||||||
Table to join.
|
Table to join.
|
||||||
|
|
||||||
|
Returns
|
||||||
|
-------
|
||||||
|
table : Table
|
||||||
|
Joined table.
|
||||||
"""
|
"""
|
||||||
if set(self.shapes) & set(other.shapes) or self.data.shape[0] != other.data.shape[0]:
|
if set(self.shapes) & set(other.shapes) or self.data.shape[0] != other.data.shape[0]:
|
||||||
raise KeyError('Dublicated keys or row count mismatch')
|
raise KeyError('Dublicated keys or row count mismatch')
|
||||||
|
|
Loading…
Reference in New Issue