无法找到一种方法将熊猫数据框插入MySql

时间:2018-09-20 08:59:40

标签: python mysql pandas for-loop pandas-to-sql

所以基本上,我有一个从API检索数据并产生带有列(数据,实时开始,值)的数据系列的函数。 然后,我有一个程序可以插入使用字典中的值命名的表。 但是,我无法弄清楚如何将数据系列上传到这些表。我尝试了很多方法,它要么从随机数据系列元素中输入值,要么出现错误: AttributeError:“ Timestamp”对象没有属性“ translate”

代码如下:

<?php 
    if($app_galleries)
    {
        $nr_gl = 0;
        foreach($app_galleries as $app_gallery)
        {
            $poza = AppController::getPrimaryPicture($app_gallery,'PictureToGallery','Gallery','picture_to_gallery_id','galleries');
            if($nr_gl%3==0)
            {
                echo '<div class="box_galleries">';
            }
?>
     <div class="box_gallery <?php echo ($nr_gl%3==2) ? 'noMarginRight' : '';?>">

0 个答案:

没有答案