From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/32073 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Albert Krewinkel Newsgroups: gmane.text.pandoc Subject: Re: HTML output: is there a way to style only one field of a pandas dataframe? Date: Tue, 24 Jan 2023 11:46:26 +0100 Message-ID: <873580kxv8.fsf@zeitkraut.de> References: <41d93efd-6895-4ce9-b857-a97b00ff2fb5n@googlegroups.com> Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="20543"; mail-complaints-to="usenet@ciao.gmane.io" To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-X-From: pandoc-discuss+bncBCZJF7XJTILRBEHRX2PAMGQEYVD5EIY-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Tue Jan 24 11:53:10 2023 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-wm1-f64.google.com ([209.85.128.64]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1pKGvL-00053s-LK for gtp-pandoc-discuss@m.gmane-mx.org; Tue, 24 Jan 2023 11:53:07 +0100 Original-Received: by mail-wm1-f64.google.com with SMTP id c66-20020a1c3545000000b003d355c13229sf10998495wma.0 for ; Tue, 24 Jan 2023 02:53:07 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1674557587; cv=pass; d=google.com; s=arc-20160816; b=L+2/scskcdzO52EcEHUnZvteSkEbPlI2VCneuZtsKuCSupcOkHUuIZ5OhOHmP1vztI ZDGizuihsqNAhdhYygiR/Ymu00vALClrONmTPiOII4MEjLRGdpZVnp71pCsDxGueXxMn zKuF1LkJTUXu7t+621v2yMitrqCVsaaxklEXNZpbU3IvU0qfY+Q79in/5uF2lfDLSWvN 4HKQyQFEgdXu5T4CUvPJYN3Mnbr2tqkKDDz6iMulNh7BLsDCdu29iUTPGLLjQD/oogBM 8ex5Fi+glCeOGbUYX0vrDupN7vtj+p1cn6/sXcQoWOeIx3npwqEKH07hF+c9o7MG4IRz /+dA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to:content-transfer-encoding :mime-version:message-id:in-reply-to:date:subject:to:from:references :sender:dkim-signature; bh=yNxG8ylSNF/PSfnYjpl8k9sjijssUsYhVFk22Hulkt4=; b=tOcdkNGozmG+p2FNfYXNXgJH7w7C6v2RT1SQ0NqiRlvZjeru1kflSbIuiPpp/UqrMj IotWffFO0y9lU3bLy+KmZi1fANW140S3HQq8JE/9onu2akKKt6hDTequRRZ7ORq2kFox oJxK3M56WOh8oJy0cqy6taprb+FukRwmmwOMXYlO9jVehlziarjDn2QucqckCNtvkWpH EVDQ+w1FxITdHSJVfpILuP4OprSSOot21qv/qZoui9UjEyCg28F3uFlXhFU9ic2xLilA bIwgNfSBe74MCWr/XA07xABUN8n1Buo4wSIOd4uX0JM49cKNbFF6zFoitvELf4GApw58 RBQA== ARC-Authentication-Results: i=2; gmr-mx.google.com; spf=pass (google.com: domain of albert+pandoc-9EawChwDxG8hFhg+JK9F0w@public.gmane.org designates 2001:67c:2050:0:465::202 as permitted sender) smtp.mailfrom=albert+pandoc-9EawChwDxG8hFhg+JK9F0w@public.gmane.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20210112; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to :x-original-authentication-results:x-original-sender :content-transfer-encoding:mime-version:message-id:in-reply-to:date :subject:to:from:references:sender:from:to:cc:subject:date :message-id:reply-to; bh=yNxG8ylSNF/PSfnYjpl8k9sjijssUsYhVFk22Hulkt4=; b=UAae8ctGDYY9oO0jUgLFOWAmiE6P1TchJcN0sIyrl/itDDYxZZYp/nHDnvt8MzMpcy af2vv/Kz6Qk7y4Iz6naMtZ2gQ/zSzYjbr/uKoJlF7sP0Qe0JRB3QzP/4T8UUxDvpi9eE nl+rYJRfcGl8ufim0LSRj+piWi28CqJ7DTwS9dnwVV6yJhW+8Gfab8eLa+VnGSi+B6Su t649LNekoiFGZH1LJhUel2ej3Yw1/flwXxqLn6cxsVNsy22vn8DZQRyILie7/dHEMWot mNeqqiitrbcqRx1YePCkHndtMmCqhCjBrxna47X+ZyXSaJHLGgY6mYGiNWgWp1Kb6 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :x-spam-checked-in-group:list-id:mailing-list:precedence:reply-to :x-original-authentication-results:x-original-sender :content-transfer-encoding:mime-version:message-id:in-reply-to:date :subject:to:from:references:x-gm-message-state:sender:from:to:cc :subject:date:message-id:reply-to; bh=yNxG8ylSNF/PSfnYjpl8k9sjijssUsYhVFk22Hulkt4=; b=yBTVnrMMD52LUuGmdEOIhGPqS074rokctYYjAuS9iVIT21coRnD20f9xxIMwEmSdsH 9JFC+PmcCuH6X6kOwPeO6iPijdmxTxnoggeJf1jcXUbeQlDO6SO2d9KZBqE4cBYanjW2 FeiuzIt/zkXBfdxUFkq/BwkX1OC7IAYCzsPbmDOsQUbnwYuRy5M+stLxEf1ZjdNuFla5 FRyrC9+evIJVvoByng0nw/5rbxjQPa+6MfSmr32NG/yfaxwbEjZkYPILalHF1v9ZbqNz r6lv75OeXQkNrNCwwLYt Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: AFqh2kpb6ONnBuIgiMNDDHNYxNJ6oIkBHqUkST50O1/MMJ1IjH1oSlls B5xuyLnNNJyj+Av1SvZw5cE= X-Google-Smtp-Source: AMrXdXvY8VxH7qHk1MsqdiFkcjoDhMhyjbi2+FXH2s0CxhFySots7Mx+h3IlITR3laPeV+FMVn8hyQ== X-Received: by 2002:a5d:4a88:0:b0:2bd:dc80:a64d with SMTP id o8-20020a5d4a88000000b002bddc80a64dmr1231013wrq.287.1674557587048; Tue, 24 Jan 2023 02:53:07 -0800 (PST) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:a5d:47a9:0:b0:298:bd4a:4dd9 with SMTP id 9-20020a5d47a9000000b00298bd4a4dd9ls905177wrb.1.-pod-prod-gmail; Tue, 24 Jan 2023 02:53:03 -0800 (PST) X-Received: by 2002:a5d:5954:0:b0:2bd:eb0a:6192 with SMTP id e20-20020a5d5954000000b002bdeb0a6192mr21941693wri.50.1674557583144; Tue, 24 Jan 2023 02:53:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674557583; cv=none; d=google.com; s=arc-20160816; b=h/YhNTj9Y/UIDd7Ms9ost/htAsaIcd2Uol6M2oyRDAY3+xFh8XUTrupV4R9b4I3KCB ZUKxSY8yQRp4Mc977f95Dnku+RwbG9dEegXxNu3XzRT32yG1uEqT8RGV6Ey0n0v/+TPs lOKz3iaugNhw1TGBLaU4SjWtTTJ5cuMWQMdsPUH6DG0eFNIcC1ddZZ0PEMLdO0J3sphf NbH+y1LrRUN8vDqvJrYXnRHrmA2/iXgrtoD14FFqkFK0aLg7Uq+g5AWyCQrIhityIrrw OhrkQRoBxPph5TAHk5HORQD1guJ32hxv/rx9u2xD9y8DpEIj6pRlTfaAdmgbSVaMJIQ7 gYuA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:message-id:in-reply-to:date :subject:to:from:references; bh=tGubJ5uwPN2XLP5XOkgOcJ1/9vsC/CbrTGDhNhLXVyI=; b=y+r/R/0st5IijRiTwZspB4nRIchhHwSxL+mmVgj1/S354Jbb3d1QwFRGy6hfSLr7fk 0pJIt4Tbv8BTevLPttUT1iNIbDWcqPi4fN9FS5yANPV01Yq0BpF/9fdOFNMX0j5ifnUx ls1TvdLoaj+VxssAG1ZmpWWxIb52g1KFn95V/EK31phLFfBQedS+6+abbBmEe1GEdeEd 4MZ2mc02aDnDsOVQfVURSlA3M0qin8UFX0DKrZ//KGSPtBMyXOK5GTPg2Xt8BH6MM2AX OQbC/71veCBjTQs1nJZDgnUuvoiIOIgDjFTMJRuceCr9biywxiTOzipvd7Wa+ncBwXHm g7zQ== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of albert+pandoc-9EawChwDxG8hFhg+JK9F0w@public.gmane.org designates 2001:67c:2050:0:465::202 as permitted sender) smtp.mailfrom=albert+pandoc-9EawChwDxG8hFhg+JK9F0w@public.gmane.org Original-Received: from mout-p-202.mailbox.org (mout-p-202.mailbox.org. [2001:67c:2050:0:465::202]) by gmr-mx.google.com with ESMTPS id r14-20020adff10e000000b002bddc018216si93326wro.1.2023.01.24.02.53.03 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 24 Jan 2023 02:53:03 -0800 (PST) Received-SPF: pass (google.com: domain of albert+pandoc-9EawChwDxG8hFhg+JK9F0w@public.gmane.org designates 2001:67c:2050:0:465::202 as permitted sender) client-ip=2001:67c:2050:0:465::202; Original-Received: from smtp1.mailbox.org (smtp1.mailbox.org [IPv6:2001:67c:2050:b231:465::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-202.mailbox.org (Postfix) with ESMTPS id 4P1P2N5pHFz9svs for ; Tue, 24 Jan 2023 11:53:00 +0100 (CET) In-reply-to: <41d93efd-6895-4ce9-b857-a97b00ff2fb5n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> X-Rspamd-Queue-Id: 4P1P2N5pHFz9svs X-Original-Sender: albert+pandoc-9EawChwDxG8hFhg+JK9F0w@public.gmane.org X-Original-Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of albert+pandoc-9EawChwDxG8hFhg+JK9F0w@public.gmane.org designates 2001:67c:2050:0:465::202 as permitted sender) smtp.mailfrom=albert+pandoc-9EawChwDxG8hFhg+JK9F0w@public.gmane.org Precedence: list Mailing-list: list pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org; contact pandoc-discuss+owners-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org List-ID: X-Google-Group-Id: 1007024079513 List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , Xref: news.gmane.io gmane.text.pandoc:32073 Archived-At: Hi Andrea, The question will probably get better answers from a different resource than from this mailing list. It looks as if you are using Quarto syntax, one of these lists should have people with more knowledge on the matter: - https://community.rstudio.com/ - https://github.com/quarto-dev/quarto-cli/discussions - https://stackoverflow.com/questions/tagged/pandas Best, Albert Andrea Borruso writes: > Hi, > if I use set_table_styles > > ```{python} #| echo: false #| warning: false import pandas as pd df =3D > pd.DataFrame({'text': ['foo', 'bar'],'number': [1, 2]}) dfStyler =3D > df.style.set_properties(**{'text-align': 'center'}) > dfStyler.set_table_styles([dict(selector=3D'th', props=3D[('text-align', > 'center')])]) ``` > > I have in jupyter notebook the style applied > > image =20 > > But how to have in HTML output in example right align only for the=20 > number column? > > If I set it in this way: > > df.style.set_properties(subset=3D["number"], **{'text-align': 'right'}) > > it works in the notebook, but in quarto (rendered via pandoc) I have=20 > number column to aligned to the left > > image =20 > > Is there a way to style only one field of a pandas dataframe? > > Thank you > > =E2=80=8B --=20 Albert Krewinkel GPG: 8eed e3e2 e8c5 6f18 81fe e836 388d c0b2 1f63 1124 --=20 You received this message because you are subscribed to the Google Groups "= pandoc-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an e= mail to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msgid/= pandoc-discuss/873580kxv8.fsf%40zeitkraut.de.