Module Expr Str Import alias Import alias ImportFrom alias ImportFrom alias Import alias identifier ImportFrom alias alias Import alias identifier ImportFrom alias alias Import alias identifier ImportFrom alias alias alias alias ImportFrom alias ImportFrom alias identifier Assign NameStore CompareLt NameLoad Str Assign NameStore Num Assign NameStore Num Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad FunctionDef arguments args defaults body ImportFrom alias identifier Assign NameStore Call NameLoad BinOpAdd NameLoad Str Expr Call NameLoad CompareEq NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args defaults body ImportFrom alias Assign NameStore AttributeLoad Call AttributeLoad NameLoad attr attr Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr BinOpAdd NameLoad Str keyword NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Expr Call NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args defaults body Assign NameStore Call NameLoad Assign NameStore AttributeLoad Call AttributeLoad NameLoad attr attr Assign NameStore AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr BinOpAdd ListLoad TupleLoad Str NameLoad TupleLoad Str NameLoad SubscriptLoad AttributeLoad NameLoad attr Slice Num Assign NameStore Call NameLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Num Assign NameStore Call NameLoad NameLoad Expr Call NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args defaults body Assign NameStore Call NameLoad Assign NameStore AttributeLoad Call AttributeLoad NameLoad attr attr Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign AttributeStore NameLoad attr ListComp BinOpMod Str NameLoad comprehension NameStore Call NameLoad Num Num Assign NameStore Call NameLoad NameLoad AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Num Assign NameStore Call NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr keyword NameLoad Expr Call NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args defaults body Assign NameStore Call NameLoad Assign NameStore Call AttributeLoad NameLoad attr ListLoad TupleLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr Str keyword ListLoad TupleLoad Str NameLoad TupleLoad Str AttributeLoad NameLoad attr TupleLoad Str Str Assign NameStore Call NameLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Num Assign NameStore Call NameLoad NameLoad keyword AttributeLoad NameLoad attr Expr Call NameLoad Call NameLoad SubscriptLoad SubscriptLoad NameLoad Index Num Index Num Expr Call NameLoad Call NameLoad SubscriptLoad SubscriptLoad NameLoad Index Num Index Num Expr Call NameLoad CompareEq SubscriptLoad SubscriptLoad NameLoad Index Num Index Num Call NameLoad Str Assign NameStore Call NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str keyword Num Expr Call NameLoad Call AttributeLoad NameLoad attr ListComp CompareEq SubscriptLoad SubscriptLoad NameLoad Index Num Index NameLoad Num comprehension NameStore Call NameLoad Num decorator_list FunctionDef arguments args defaults body Assign NameStore Call NameLoad Assign NameStore AttributeLoad Call AttributeLoad NameLoad attr attr Assign NameStore AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr BinOpAdd ListLoad TupleLoad Str Str TupleLoad Str Str SubscriptLoad AttributeLoad NameLoad attr Slice Num Assign NameStore Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr BinOpAdd ListLoad TupleLoad Str Str TupleLoad Str Str SubscriptLoad AttributeLoad NameLoad attr Slice Num Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call NameLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Num Assign NameStore Call NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad If CompareIs SubscriptLoad AttributeLoad NameLoad attr Index Num Call AttributeLoad NameLoad attr Str body Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad orelse Expr Call AttributeLoad NameLoad attr NameLoad SubscriptLoad NameLoad Index SubscriptLoad AttributeLoad NameLoad attr Slice Num decorator_list FunctionDef arguments args defaults body Pass decorator_list FunctionDef arguments args defaults body Assign NameStore ListLoad TupleLoad Call NameLoad Num Num Num Num Num Num Num Call NameLoad Num Num Num Call NameLoad Num Num Num Call NameLoad Num Num Num Call NameLoad Num Num Num Call NameLoad Num Num Num Call NameLoad Num Num Num TupleLoad Call NameLoad Num Num Num Num Num Num Num Call NameLoad Num Num Num Call NameLoad Num Num Num Call NameLoad Num Num Num Call NameLoad Num Num Num Call NameLoad Num Num Num Call NameLoad Num Num Num With Call AttributeLoad NameLoad attr keyword NameLoad NameStore body Assign NameStore Call NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str Expr Call NameLoad CompareEq Call NameLoad NameLoad Num Expr Call NameLoad Call AttributeLoad SubscriptLoad NameLoad Index Num attr SubscriptLoad NameLoad Index Num Expr Call NameLoad Call AttributeLoad SubscriptLoad NameLoad Index Num attr SubscriptLoad NameLoad Index Num With Call AttributeLoad NameLoad attr keyword NameLoad body Assign NameStore Call NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str keyword NameLoad Expr Call NameLoad Call AttributeLoad SubscriptLoad AttributeLoad NameLoad attr Index Num attr SubscriptLoad NameLoad Index Num Expr Call NameLoad Call AttributeLoad SubscriptLoad AttributeLoad NameLoad attr Index Num attr SubscriptLoad NameLoad Index Num decorator_list Call AttributeLoad NameLoad attr NameLoad FunctionDef arguments args defaults body Assign NameStore ListLoad Num Num Num Num Num Num Num Assign NameStore ListLoad Num Num Num Num Num Num Num Num Num Num Num Assign NameStore ListLoad Num Num Num Num Num Num Num Num Num Num Num Assign NameStore ListLoad Num Num Num Num Num Num Num Num Num Num Num Num Num Assign NameStore ListLoad Num Num Num Num Num Num Num Num Num Num Num Assign NameStore ListLoad Num Num Num Num Num Num Num Num Num Num Num Num Num Num Num Assign NameStore ListLoad Num Num Num Num Num Num Num For NameStore NameLoad body Expr Call NameLoad Call NameLoad Call NameLoad NameLoad Str Str NameLoad For NameStore NameLoad body Expr Call NameLoad Call NameLoad Call NameLoad NameLoad Str Str NameLoad For NameStore NameLoad body Expr Call NameLoad Call NameLoad Call NameLoad NameLoad Str Str NameLoad For NameStore NameLoad body Expr Call NameLoad Call NameLoad Call NameLoad NameLoad Str Str NameLoad For NameStore NameLoad body Expr Call NameLoad Call NameLoad Call NameLoad NameLoad Str Str NameLoad For NameStore NameLoad body Expr Call NameLoad Call NameLoad Call NameLoad NameLoad Str Str NameLoad For NameStore NameLoad body Expr Call NameLoad Call NameLoad Call NameLoad NameLoad Str Str NameLoad decorator_list FunctionDef arguments args defaults body Assign NameStore Call AttributeLoad NameLoad attr ListLoad TupleLoad Num Call NameLoad Num Num Num Num TupleLoad Num Call NameLoad Num Num Num Num TupleLoad Num Call NameLoad Num Num Num Num keyword ListLoad TupleLoad Str NameLoad TupleLoad Str NameLoad TupleLoad Str NameLoad Assign NameStore Call NameLoad Assign NameStore Call NameLoad NameLoad NameLoad Dict Str Str Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Num Assign NameStore Call NameLoad NameLoad Expr Call NameLoad NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call NameLoad Assign NameStore Call NameLoad NameLoad NameLoad Dict Str Str Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Num Assign NameStore Call NameLoad NameLoad keyword NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Call AttributeLoad NameLoad attr Str keyword Num decorator_list Call AttributeLoad NameLoad attr NameLoad If CompareEq NameLoad Str body Import alias Expr Call AttributeLoad NameLoad attr keyword ListLoad NameLoad Str Str Str keyword NameLoad
N/A N/A 
Tests for iolib/foreign.py
 N/A os N/A warnings datetime datetime numpy.testing * N/A numpy np pandas DataFrame isnull N/A pandas.util.testing ptesting statsmodels.compat.python BytesIO asbytes N/A statsmodels.api sm statsmodels.iolib.foreign StataWriter genfromdta _datetime_to_stata_elapsed _stata_elapsed_date_to_datetime statsmodels.datasets macrodata statsmodels.compat.pandas version pandas_version N/A pandas_old N/A pandas_version 0.9 N/A DECIMAL_4 4 N/A DECIMAL_3 3 N/A curdir N/A N/A N/A os path dirname N/A N/A N/A os path abspath __file__ test_genfromdta N/A N/A N/A N/A results.macrodata macrodata_result res2 N/A res1 N/A genfromdta N/A curdir /../../datasets/macrodata/macrodata.dta N/A N/A assert_array_equal N/A res1 res2 True N/A test_genfromdta_pandas N/A N/A N/A N/A pandas.util.testing assert_frame_equal N/A dta N/A N/A N/A macrodata load_pandas data N/A curdir N/A N/A N/A os path dirname N/A N/A N/A os path abspath __file__ N/A res1 N/A N/A N/A sm iolib genfromdta N/A curdir /../../datasets/macrodata/macrodata.dta pandas True N/A res1 N/A N/A res1 astype float N/A N/A assert_frame_equal res1 dta N/A test_stata_writer_structured N/A N/A N/A N/A N/A buf N/A BytesIO N/A dta N/A N/A N/A macrodata load data N/A dtype N/A dta dtype N/A dta N/A N/A dta astype N/A N/A np dtype N/A N/A N/A year int N/A quarter int N/A N/A dtype descr N/A 2 N/A writer N/A StataWriter buf dta N/A N/A N/A writer write_file N/A N/A N/A buf seek 0 N/A dta2 N/A genfromdta buf N/A N/A assert_array_equal dta dta2 N/A test_stata_writer_array N/A N/A N/A N/A N/A buf N/A BytesIO N/A dta N/A N/A N/A macrodata load data N/A dta N/A N/A DataFrame from_records dta N/A N/A dta columns N/A N/A v%d i N/A i N/A range 1 15 N/A writer N/A StataWriter buf N/A dta values N/A N/A N/A writer write_file N/A N/A N/A buf seek 0 N/A dta2 N/A genfromdta buf N/A dta N/A N/A dta to_records index False N/A N/A assert_array_equal dta dta2 N/A test_missing_roundtrip N/A N/A N/A N/A N/A buf N/A BytesIO N/A dta N/A N/A np array N/A N/A N/A np nan N/A np inf dtype N/A N/A double_miss float N/A float_miss N/A np float32 N/A string_miss a1 N/A writer N/A StataWriter buf dta N/A N/A N/A writer write_file N/A N/A N/A buf seek 0 N/A dta N/A genfromdta buf missing_flt N/A np nan N/A N/A assert_ N/A isnull N/A N/A dta N/A 0 N/A 0 N/A N/A assert_ N/A isnull N/A N/A dta N/A 0 N/A 1 N/A N/A assert_ N/A N/A N/A dta N/A 0 N/A 2 N/A asbytes N/A dta N/A genfromdta N/A N/A N/A os path join curdir results/data_missing.dta missing_flt -999 N/A N/A assert_ N/A N/A np all N/A N/A N/A N/A dta N/A 0 N/A i -999 N/A i N/A range 5 N/A test_stata_writer_pandas N/A N/A N/A N/A N/A buf N/A BytesIO N/A dta N/A N/A N/A macrodata load data N/A dtype N/A dta dtype N/A dta N/A N/A dta astype N/A N/A np dtype N/A N/A N/A year i8 N/A quarter i8 N/A N/A dtype descr N/A 2 N/A dta4 N/A N/A dta astype N/A N/A np dtype N/A N/A N/A year i4 N/A quarter i4 N/A N/A dtype descr N/A 2 N/A dta N/A N/A DataFrame from_records dta N/A dta4 N/A N/A DataFrame from_records dta4 N/A writer N/A StataWriter buf dta N/A N/A N/A writer write_file N/A N/A N/A buf seek 0 N/A dta2 N/A genfromdta buf N/A dta5 N/A N/A DataFrame from_records dta2 N/A N/A N/A N/A dta5 dtypes N/A 1 N/A N/A np dtype int64 N/A N/A N/A N/A ptesting assert_frame_equal N/A N/A dta reset_index dta5 N/A N/A N/A N/A ptesting assert_frame_equal dta4 N/A dta5 N/A N/A N/A dta5 columns N/A 1 N/A test_stata_writer_unicode N/A N/A N/A N/A N/A N/A test_genfromdta_datetime N/A N/A N/A N/A N/A results N/A N/A N/A datetime 2006 11 19 23 13 20 1479596223000 N/A datetime 2010 1 20 N/A datetime 2010 1 8 N/A datetime 2010 1 1 N/A datetime 1974 7 1 N/A datetime 2010 1 1 N/A datetime 2010 1 1 N/A N/A datetime 1959 12 31 20 3 20 -1479590 N/A datetime 1953 10 2 N/A datetime 1948 6 10 N/A datetime 1955 1 1 N/A datetime 1955 7 1 N/A datetime 1955 1 1 N/A datetime 2 1 1 N/A N/A N/A warnings catch_warnings record True w N/A N/A dta N/A genfromdta N/A N/A N/A os path join curdir results/time_series_examples.dta N/A N/A assert_ N/A N/A len w 1 N/A N/A assert_array_equal N/A N/A N/A dta N/A 0 tolist N/A results N/A 0 N/A N/A assert_array_equal N/A N/A N/A dta N/A 1 tolist N/A results N/A 1 N/A N/A N/A warnings catch_warnings record True N/A N/A dta N/A genfromdta N/A N/A N/A os path join curdir results/time_series_examples.dta pandas True N/A N/A assert_array_equal N/A N/A N/A N/A dta iloc N/A 0 tolist N/A results N/A 0 N/A N/A assert_array_equal N/A N/A N/A N/A dta iloc N/A 1 tolist N/A results N/A 1 N/A N/A N/A dec skipif pandas_old test_date_converters N/A N/A N/A N/A N/A ms N/A -1479597200000 -1000000.0 -100000.0 -100 100000.0 1000000.0 1479597200000 N/A days N/A -100000.0 -1200 -800 -365 -50 0 50 365 800 1200 100000.0 N/A weeks N/A -10000.0 -100.0 -53 -52 -51 0 51 52 53 100.0 10000.0 N/A months N/A -10000.0 -1000.0 -100 -13 -12 -11 0 11 12 13 100 1000.0 10000.0 N/A quarter N/A -100 -50 -5 -4 -3 0 3 4 5 50 100 N/A half N/A -50 40 30 10 3 2 1 0 1 2 3 10 30 40 50 N/A year N/A 1 50 500 1000 1500 1975 2075 N/A i ms N/A N/A N/A assert_equal N/A _datetime_to_stata_elapsed N/A _stata_elapsed_date_to_datetime i tc tc i N/A i days N/A N/A N/A assert_equal N/A _datetime_to_stata_elapsed N/A _stata_elapsed_date_to_datetime i td td i N/A i weeks N/A N/A N/A assert_equal N/A _datetime_to_stata_elapsed N/A _stata_elapsed_date_to_datetime i tw tw i N/A i months N/A N/A N/A assert_equal N/A _datetime_to_stata_elapsed N/A _stata_elapsed_date_to_datetime i tm tm i N/A i quarter N/A N/A N/A assert_equal N/A _datetime_to_stata_elapsed N/A _stata_elapsed_date_to_datetime i tq tq i N/A i half N/A N/A N/A assert_equal N/A _datetime_to_stata_elapsed N/A _stata_elapsed_date_to_datetime i th th i N/A i year N/A N/A N/A assert_equal N/A _datetime_to_stata_elapsed N/A _stata_elapsed_date_to_datetime i ty ty i N/A test_datetime_roundtrip N/A N/A N/A N/A N/A dta N/A N/A np array N/A N/A 1 N/A datetime 2010 1 1 2 N/A 2 N/A datetime 2010 2 1 3 N/A 4 N/A datetime 2010 3 1 5 dtype N/A N/A var1 float N/A var2 object N/A var3 float N/A buf N/A BytesIO N/A writer N/A StataWriter buf dta N/A var2 tm N/A N/A N/A writer write_file N/A N/A N/A buf seek 0 N/A dta2 N/A genfromdta buf N/A N/A assert_equal dta dta2 N/A dta N/A N/A DataFrame from_records dta N/A buf N/A BytesIO N/A writer N/A StataWriter buf dta N/A var2 tm N/A N/A N/A writer write_file N/A N/A N/A buf seek 0 N/A dta2 N/A genfromdta buf pandas True N/A N/A N/A ptesting assert_frame_equal dta N/A N/A dta2 drop index axis 1 N/A N/A N/A dec skipif pandas_old N/A N/A __name__ __main__ N/A N/A nose N/A N/A N/A nose runmodule argv N/A __file__ -vvs -x --pdb exit False