2016-07-26 3 views
-1

Ipython Consoleから直接データフレームをcsvに印刷しようとしていますが、このシンボルが表示されてから「...:」が表示されません。 シンボルは何を意味していますか?Ipythonコンソールのanacondaでは "...:"とはどういう意味ですか?

私はcsvを強制的に印刷できますか?

コード:

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")] 
+0

から

は、あなたの質問に、あなたのコードを追加します。ごくわずかな情報ではお手伝いできません。また、あなたの望む結果の例と実際の結果を与えることも良い考えです。 – HolyDanna

+2

出力が切り捨てられていることを意味します。http://pandas.pydata.org/pandas-docs/stable/options.html –

+0

@HolyDannaはコードを追加していない必要があります。 – RustyShackleford

答えて

2

表示

pandasはiPython/Jupyterでコンソールに印刷され、それはデータの行が上に表示されたインの間にデータがあることを示すために...を使用してサイジング出力。これは、1つの値をすべて印刷するためにデータを大きくする場合に便利です。これは、表示オプションをオーバーライドしない限り、デフォルトの動作です。 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] 
+1

行pd.setが機能しました。どうもありがとうございます!\ – RustyShackleford

関連する問題