[英]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")]
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.