我一直在尝试分析一些ig注释。我有一个由用户名和评论组成的数据集。
如您所见,文本以MemoryStream stream = new MemoryStream();
// Create a new PDF document
PdfDocument document = new PdfDocument();
document.Info.Title ="Certificate";
document.Info.Author = "My Author";
document.Info.Subject = "My Subject.";
// Create an empty page
PdfPage page = document.AddPage();
page.Width = 419;
page.Height = 595;
page.Orientation = PdfSharp.PageOrientation.Landscape;
// Get an XGraphics object for drawing
XGraphics gfx = XGraphics.FromPdfPage(page);
// Draw background
string pdfTemplate = HttpContext.Current.Server.MapPath("~/Content/Images/CertificateBackground.png");
gfx.DrawImage(XImage.FromFile(pdfTemplate), 0, 0, 595, 419);
// Save the document to stream
document.Save(stream, false);
HttpResponseMessage httpResponseMessage = Request.CreateResponse(HttpStatusCode.OK);
httpResponseMessage = Request.CreateResponse(HttpStatusCode.OK);
httpResponseMessage.Content = new ByteArrayContent(stream.ToArray());
httpResponseMessage.Content.Headers.ContentDisposition = new System.Net.Http.Headers.ContentDispositionHeaderValue("attachment");
httpResponseMessage.Content.Headers.ContentDisposition.FileName = document.Info.Title;
httpResponseMessage.Content.Headers.ContentType = new System.Net.Http.Headers.MediaTypeHeaderValue("application/pdf");
return httpResponseMessage;
结尾
我想扩大评论部分,与我需要在幻灯片中向老师展示整个文本没有关系。
答案 0 :(得分:4)
尝试一下
pd.set_option('display.width', None)
pandas将正确地自动检测数据框的宽度,并在一行中显示所有列。
如果您希望同时显示所有列和所有行,请使用以下所有内容
pd.set_option('display.max_rows', None)
pd.set_option('display.max_columns', None)
pd.set_option('display.width', None)
pd.set_option('display.max_colwidth', -1)