File tree 2 files changed +10
-1
lines changed
2 files changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -1028,7 +1028,7 @@ def _possibly_convert_platform(values):
1028
1028
1029
1029
if isinstance (values , (list ,tuple )):
1030
1030
values = lib .list_to_object_array (values )
1031
- if values . dtype == np .object_ :
1031
+ if getattr ( values , ' dtype' , None ) == np .object_ :
1032
1032
values = lib .maybe_convert_objects (values )
1033
1033
1034
1034
return values
Original file line number Diff line number Diff line change @@ -2040,6 +2040,15 @@ def test_constructor_dtype_list_data(self):
2040
2040
self .assert_ (df .ix [1 , 0 ] is None )
2041
2041
self .assert_ (df .ix [0 , 1 ] == '2' )
2042
2042
2043
+ def test_constructor_list_frames (self ):
2044
+
2045
+ # GH 3243
2046
+ result = DataFrame ([DataFrame ([])])
2047
+ self .assert_ (result .shape == (1 ,0 ))
2048
+
2049
+ result = DataFrame ([DataFrame (dict (A = range (5 )))])
2050
+ self .assert_ (type (result .iloc [0 ,0 ]) == DataFrame )
2051
+
2043
2052
def test_constructor_mixed_dtypes (self ):
2044
2053
2045
2054
def _make_mixed_dtypes_df (typ , ad = None ):
You can’t perform that action at this time.
0 commit comments