Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added pandas/tests/io/data/parquet/simple.parquet
Binary file not shown.
18 changes: 18 additions & 0 deletions pandas/tests/io/test_parquet.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
""" test parquet compat """
import datetime
from distutils.version import LooseVersion
from io import BytesIO
import locale
import os
from warnings import catch_warnings
Expand Down Expand Up @@ -494,6 +495,23 @@ def test_s3_roundtrip(self, df_compat, s3_resource, pa):
# GH #19134
check_round_trip(df_compat, pa, path="s3://pandas-test/pyarrow.parquet")

@tm.network
@td.skip_if_no("pyarrow")
def test_parquet_read_from_url(self, df_compat):
url = (
"https://raw.githubusercontent.com/pandas-dev/pandas/"
"master/pandas/tests/io/data/parquet/simple.parquet"
)
df = pd.read_parquet(url)
tm.assert_frame_equal(df, df_compat)

@td.skip_if_no("pyarrow")
def test_read_file_like_obj_support(self, df_compat):
buffer = BytesIO()
df_compat.to_parquet(buffer)
df_from_buf = pd.read_parquet(buffer)
tm.assert_frame_equal(df_compat, df_from_buf)

def test_partition_cols_supported(self, pa, df_full):
# GH #23283
partition_cols = ["bool", "int"]
Expand Down