简体   繁体   English

在Ipython控制台anaconda中,“…:”是什么意思?

[英]what does “ …:” mean in Ipython console anaconda?

I am trying to print a dataframe into a csv directly from Ipython Console, but I get this symbol and then nothing " ...:". 我试图直接从Ipython控制台将数据帧打印到csv中,但是我得到了这个符号,然后什么也没有“ ...:”。 What does the symbol mean? 该符号是什么意思?

Is there anyway I can force my csv to print ? 无论如何,我可以强制打印csv吗?

Code: 码:

import ET_Client
import pandas as pd


AggreateDF = pd.DataFrame()

try:

    debug = False
    stubObj = ET_Client.ET_Client(False, debug)

    print '>>>BounceEvents'
    getBounceEvent = ET_Client.ET_BounceEvent()
    getBounceEvent.auth_stub = stubObj    
    getResponse1 = getBounceEvent.get()
    ResponseResultsBounces = getResponse1.results
    Results_Message = getResponse1.message
    print "This is orginial " + str(Results_Message) 
    #print ResponseResultsBounces

    i = 1
    while (Results_Message == 'MoreDataAvailable'):
        if i > 5: break
        print Results_Message
        results1 = getResponse1.results
        i = i + 1
        ClientIDBounces = []
        partner_keys1 = []
        created_dates1 = []
        modified_date1 = []
        ID1 = []
        ObjectID1 = []
        SendID1 = []
        SubscriberKey1 = []
        EventDate1 = []
        EventType1 = []
        TriggeredSendDefinitionObjectID1 = []
        BatchID1 = []
        SMTPCode = []
        BounceCategory = []
        SMTPReason = []
        BounceType = []

        for BounceEvent in ResponseResultsBounces:
            ClientIDBounces.append(str(BounceEvent['Client']['ID']))
            partner_keys1.append(BounceEvent['PartnerKey'])
            created_dates1.append(BounceEvent['CreatedDate'])
            modified_date1.append(BounceEvent['ModifiedDate'])
            ID1.append(BounceEvent['ID'])
            ObjectID1.append(BounceEvent['ObjectID'])
            SendID1.append(BounceEvent['SendID'])
            SubscriberKey1.append(BounceEvent['SubscriberKey'])
            EventDate1.append(BounceEvent['EventDate'])
            EventType1.append(BounceEvent['EventType'])
            TriggeredSendDefinitionObjectID1.append(BounceEvent['TriggeredSendDefinitionObjectID'])
            BatchID1.append(BounceEvent['BatchID'])
            SMTPCode.append(BounceEvent['SMTPCode'])
            BounceCategory.append(BounceEvent['BounceCategory'])
            SMTPReason.append(BounceEvent['SMTPReason'])
            BounceType.append(BounceEvent['BounceType'])

        df1 = pd.DataFrame({'ClientID': ClientIDBounces, 'PartnerKey': partner_keys1,
                       'CreatedDate' : created_dates1, 'ModifiedDate': modified_date1, 
                       'ID':ID1, 'ObjectID': ObjectID1,'SendID':SendID1,'SubscriberKey':SubscriberKey1,
                       'EventDate':EventDate1,'EventType':EventType1,'TriggeredSendDefinitionObjectID':TriggeredSendDefinitionObjectID1,
                       'BatchID':BatchID1,'SMTPCode':SMTPCode,'BounceCategory':BounceCategory,'SMTPReason':SMTPReason,'BounceType':BounceType})
        #print(df1['ID'].max())
        AggreateDF = AggreateDF.append(df1)   
        print(AggreateDF)          
        #print df1
        df_masked1 = df1[(df1.EventDate > "2016-02-20") & (df1.EventDate < "2016-07-25")]

Display Sizing 显示尺寸

When pandas is printing to the console in iPython/Jupyter, it uses ... to show that there is data in-between rows of the data displayed on the output. pandas在iPython / Jupyter中打印到控制台时,它使用...来显示输出中显示的数据行之间有数据。 This is useful when the data is to large to print every single value. 当数据很大以打印每个值时,此功能很有用。 This is the default behavior unless you override the display options. 这是默认行为,除非您覆盖显示选项。

From Frequently Used Options 常用选项

 df = pd.DataFrame(np.random.randn(7,2))
 pd.set_option('max_rows', 7)
 df

          0         1
0  0.469112 -0.282863
1 -1.509059 -1.135632
2  1.212112 -0.173215
3  0.119209 -1.044236
4 -0.861849 -2.104569
5 -0.494929  1.071804
6  0.721555 -0.706771

pd.set_option('max_rows', 5)
df

           0         1
0   0.469112 -0.282863
1  -1.509059 -1.135632
..       ...       ...
5  -0.494929  1.071804
6   0.721555 -0.706771

[7 rows x 2 columns]

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Spyder(Anaconda)的 IPython 控制台中没有 output - No output in IPython Console in Spyder (Anaconda) Spyder(Anaconda) 中的 IPython 控制台正在截断输出 - IPython Console in Spyder(Anaconda) is truncating output Spyder中的IPython控制台在Anaconda中非常慢 - IPython console in spyder extremely slow in Anaconda IPython Notebook中的[*]是什么意思以及如何将其关闭? - What does In [*] in IPython Notebook mean and how to turn it off? “ pip install ipython [notebook]”中的“ [notebook]”是什么意思? - What does the '[notebook]' in 'pip install ipython[notebook]' mean? 在 Anaconda 中运行此 python 脚本时,此回溯错误意味着什么? - What does this traceback error mean when running this python script in Anaconda? 如何在Anaconda 2.0中使用Python 3.4激活Ipython Notebook和QT Console - How to activate Ipython Notebook and QT Console with Python 3.4 in Anaconda 2.0 此控制台消息在Google App Engine中的含义是什么 - What does this console message mean in Google App Engine 让IPython导入我的意思 - Make IPython Import What I Mean x[:,[0,1,2,2]](一种拼接)在python的numpy数组中是什么意思? 我在 anaconda 中执行以下操作 - What does x[:,[0,1,2,2]](a kind of splicing) mean in numpy arrays in python? I was executing the following in anaconda
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM