Skip to content

Commit

Permalink
fixup merge
Browse files Browse the repository at this point in the history
  • Loading branch information
jorisvandenbossche committed Oct 8, 2019
1 parent a2b0c14 commit 89c225f
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 7 deletions.
6 changes: 2 additions & 4 deletions cpp/src/arrow/python/arrow_to_pandas.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1482,7 +1482,7 @@ class ExtensionBlock : public PandasBlock {
return Status::OK();
}

Status Write(const std::shared_ptr<ChunkedArray>& data, int64_t abs_placement,
Status Write(std::shared_ptr<ChunkedArray> data, int64_t abs_placement,
int64_t rel_placement) override {
PyAcquireGIL lock;

Expand Down Expand Up @@ -1644,9 +1644,7 @@ class DataFrameBlockCreator {
explicit DataFrameBlockCreator(const PandasOptions& options,
const std::unordered_set<std::string>& extension_columns,
const std::shared_ptr<Table>& table)
: table_(table),
options_(options),
extension_columns_(extension_columns) {}
: table_(table), options_(options), extension_columns_(extension_columns) {}

Status Convert(PyObject** output) {
column_types_.resize(table_->num_columns());
Expand Down
3 changes: 1 addition & 2 deletions cpp/src/arrow/python/arrow_to_pandas.h
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,7 @@ ARROW_PYTHON_EXPORT
Status ConvertTableToPandas(const PandasOptions& options,
const std::unordered_set<std::string>& categorical_columns,
const std::unordered_set<std::string>& extension_columns,
const std::shared_ptr<Table>& table, MemoryPool* pool,
PyObject** out);
const std::shared_ptr<Table>& table, PyObject** out);

} // namespace py
} // namespace arrow
Expand Down
3 changes: 2 additions & 1 deletion python/pyarrow/pandas_compat.py
Original file line number Diff line number Diff line change
Expand Up @@ -677,7 +677,8 @@ def _reconstruct_block(item):
bitmask = buflist[0]
if bitmask is not None:
mask = pa.BooleanArray.from_buffers(
pa.bool_(), len(arr), [None, bitmask]).to_pandas()
pa.bool_(), len(arr), [None, bitmask])
mask = np.asarray(mask)
else:
mask = np.ones(len(arr), dtype=bool)
block_arr = _pandas_api.pd.arrays.IntegerArray(
Expand Down
1 change: 1 addition & 0 deletions python/pyarrow/tests/test_pandas.py
Original file line number Diff line number Diff line change
Expand Up @@ -3207,6 +3207,7 @@ def _to_pandas(table, extension_columns=None):
from pyarrow.pandas_compat import table_to_blockmanager

options = dict(
pool=None,
strings_to_categorical=False,
zero_copy_only=False,
integer_object_nulls=False,
Expand Down

0 comments on commit 89c225f

Please sign in to comment.