(df, schema, columns)
| 553 | |
| 554 | |
| 555 | def _resolve_columns_of_interest(df, schema, columns): |
| 556 | if schema is not None and columns is not None: |
| 557 | raise ValueError('Schema and columns arguments are mutually ' |
| 558 | 'exclusive, pass only one of them') |
| 559 | elif schema is not None: |
| 560 | columns = schema.names |
| 561 | elif columns is not None: |
| 562 | columns = [c for c in columns if c in df.columns] |
| 563 | else: |
| 564 | columns = df.columns |
| 565 | |
| 566 | return columns |
| 567 | |
| 568 | |
| 569 | def dataframe_to_types(df, preserve_index, columns=None): |
no outgoing calls
no test coverage detected