打印所有内容,不带省略号

时间:2017-02-19 12:41:18

标签: pandas

当我尝试打印列时,

print dataframe.columns

它告诉我

Index([u'Id', u'Guid', u'HardDisksInfo', u'ServerVersion', u'Email',
       u'BackupServer', u'DataSizeQuota', u'HostRamSize', u'CpuModel',
       u'CpuSpeed',
       ...
       u'Post_Month', u'Geography', u'Region', u'Budget_Region',
       u'Product_Family', u'Product_Name', u'Product_Version', u'License_Type',
       u'Language', u'row_num'],
      dtype='object', length=131)

如何在没有...的情况下显示所有内容?

1 个答案:

答案 0 :(得分:2)

您需要将Intent outlookIntent = new Intent(Intent.ACTION_SEND); outlookIntent.setType("text/html"); final PackageManager pm = getPackageManager(); final List<ResolveInfo> matches = pm.queryIntentActivities(outlookIntent, 0); String outlookActivityClass = null; for (final ResolveInfo info : matches) { if (info.activityInfo.packageName.equals("com.microsoft.office.outlook")) { outlookActivityClass = info.activityInfo.name; if (outlookActivityClass != null && !outlookActivityClass.isEmpty()) { break; } } } outlookIntent.setClassName("com.microsoft.office.outlook", outlookActivityClass); outlookIntent.putExtra(Intent.EXTRA_EMAIL, new String[] { "yourmail@gmail.com" }); outlookIntent.putExtra(Intent.EXTRA_SUBJECT, "Subject"); outlookIntent.putExtra(Intent.EXTRA_CC, "cc@gmail.com"); // if necessary outlookIntent.putExtra(Intent.EXTRA_TEXT, "Email message"); outlookIntent.setData(Uri.parse("yourmail@gmail.com")); startActivity(outlookIntent); 设置为display.max_seq_items或将某些值设置为None - 请参阅Django

  

选项:display.max_seq_items
  默认:100

     

功能:当漂亮打印长序列时,不会再打印max_seq_items。如果省略了项目,则将通过在结果字符串中添加“...”来表示它们。如果设置为“无”,则要打印的项目数不受限制。

100
idx = [u'Id', u'Guid', u'HardDisksInfo', u'ServerVersion', u'Email',
       u'BackupServer', u'DataSizeQuota', u'HostRamSize', u'CpuModel',
       u'CpuSpeed',

       u'Post_Month', u'Geography', u'Region', u'Budget_Region',
       u'Product_Family', u'Product_Name', u'Product_Version', u'License_Type',
       u'Language', u'row_num']
idx = idx * 10
df = pd.DataFrame(columns=idx)

print (df.columns)
Index(['Id', 'Guid', 'HardDisksInfo', 'ServerVersion', 'Email', 'BackupServer',
       'DataSizeQuota', 'HostRamSize', 'CpuModel', 'CpuSpeed',
       ...
       'Post_Month', 'Geography', 'Region', 'Budget_Region', 'Product_Family',
       'Product_Name', 'Product_Version', 'License_Type', 'Language',
       'row_num'],
      dtype='object', length=200)

#temporaly display all columns
with pd.option_context('display.max_seq_items', None):
    print (df.columns)