We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 83a6e09 commit 0c1f471Copy full SHA for 0c1f471
pandas/io/tests/test_sql.py
@@ -219,6 +219,18 @@ def test_keyword_as_column_names(self):
219
df = DataFrame({'From':np.ones(5)})
220
sql.write_frame(df, con = self.db, name = 'testkeywords')
221
222
+ def test_onecolumn_of_integer(self):
223
+ '''
224
+ a column_of_integers dataframe should transfer well to sql
225
226
+ mono_df=DataFrame([1 , 2], columns=['c0'])
227
+ sql.write_frame(mono_df, con = self.db, name = 'mono_df')
228
+ # computing the sum via sql
229
+ con_x=self.db
230
+ the_sum=sum([my_c0[0] for my_c0 in con_x.execute("select * from mono_df")])
231
+ # it should not fail, and gives 3 ( Issue #3628 )
232
+ self.assertEqual(the_sum , 3)
233
+
234
235
class TestMySQL(unittest.TestCase):
236
0 commit comments