Return list of fieldnames in df
(df)
| 1654 | |
| 1655 | |
| 1656 | def _get_fieldnames(df): |
| 1657 | """ |
| 1658 | Return list of fieldnames in df |
| 1659 | """ |
| 1660 | if isinstance(df,pd.DataFrame): |
| 1661 | fieldnames = list(df.columns) |
| 1662 | # Remove any column corresponding to |
| 1663 | # a dimension (time, height or frequency) |
| 1664 | for dim in dimension_names.keys(): |
| 1665 | name, axis = _get_dim(df,dim) |
| 1666 | if axis==1: |
| 1667 | fieldnames.remove(name) |
| 1668 | return fieldnames |
| 1669 | elif isinstance(df,pd.Series): |
| 1670 | return [df.name,] |
| 1671 | |
| 1672 | |
| 1673 | def _contains_field(df,fieldname): |
no test coverage detected