From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/32069 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Andrea Borruso 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 00:56:20 -0800 (PST) Message-ID: References: <41d93efd-6895-4ce9-b857-a97b00ff2fb5n@googlegroups.com> Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_446_2109883384.1674550580742" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="30726"; mail-complaints-to="usenet@ciao.gmane.io" To: pandoc-discuss Original-X-From: pandoc-discuss+bncBDLLZEVS7UJBBNV2X2PAMGQETZJQVDY-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Tue Jan 24 09:56:26 2023 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-oa1-f59.google.com ([209.85.160.59]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1pKF6Q-0007nC-4i for gtp-pandoc-discuss@m.gmane-mx.org; Tue, 24 Jan 2023 09:56:26 +0100 Original-Received: by mail-oa1-f59.google.com with SMTP id 586e51a60fabf-16320d2b9c7sf60336fac.19 for ; Tue, 24 Jan 2023 00:56:26 -0800 (PST) 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-sender :mime-version:subject:references:in-reply-to:message-id:to:from:date :sender:from:to:cc:subject:date:message-id:reply-to; bh=x00hFC3LSOistZEEc6dnV56CgiVWbQhYWridqqxRV48=; b=Sn9gmNoFkmcLpBQCdPY3WrCG48z9RYdmZEZmOmSjCFxtjGU8dgNDdYjiTorJ54D7t8 dh8kQY2sLEXG7TLPUGIh8/MOQVNsJn2jU3DNRnbegdEJecq7pdWt5OA1fZMeiTVIi1UO gH6XFHPmpIjmD4ZCEnOK0r077R2tJ5/dzQl2wh9lKGygLHm/IEz/IkGXM9kwMKpagPP1 ji0FNJfxBUkQboatN4tzZnjCZArKFBN4eZK9/eNqI05w5DNvgSWHYqmkrie7uF59Gpqw MVNob+wo5ACpvG1IPE/vamt5ZrKiqRcmNdP+cKn2Pym7/0GaOkfXDluPvfiVgW8iaAjd dpWA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to:x-original-sender :mime-version:subject:references:in-reply-to:message-id:to:from:date :from:to:cc:subject:date:message-id:reply-to; bh=x00hFC3LSOistZEEc6dnV56CgiVWbQhYWridqqxRV48=; b=ESEqE/pKIofik9KsdCzTpZPLdknTnXtPCeMZ1V5CW9OI/1ZDKvnX6PdolWtmgwWBW3 +s5z129fUg9QEAWxl+KnE21O+WTSjJuACF097M0YX7uee8vfmqBS2eg9Yt+Yt9tabsbh 2MYfFfPlaw0/HxvPmofPrG5c1TRcF1D6JLL+D1ys1jS55plRAsPgFCTaGxWgPACt9Hsa KzgpwBAVek24uliKDRkmWM4BbbGTu5RCE+DHr6SNROoE4Coltxz/jSYLAIwsylY2cqxT nGoFHWr0k6CE8W2jivCnlFCdcXZ2qbnXAC65Dj8npwrupGm87dkEoIfkgzv6nTrjtJIH HR4w== 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-sender:mime-version:subject:references:in-reply-to :message-id:to:from:date:x-gm-message-state:sender:from:to:cc :subject:date:message-id:reply-to; bh=x00hFC3LSOistZEEc6dnV56CgiVWbQhYWridqqxRV48=; b=8Q1AqgPo1jewIuK89k7byPpDZwU6oYTQu+oEbiaAdYBjqZjeB+rXBOCzHk2/ZJpftl +9blR5LwXUUHKSB6oixgDtzHUlV7JPcY4gQKaqwIDkEydrfqSkD/3gut4BAdGQZ8AlL5 Q6fkmMGexYsiS+vE7GAKS1ntmjHZjt1dww7Urzw4Pw4WEbOXuGYqAPNCcTLpJbMCMQdo atDBNe9zcORImXn3VVVEZSu8/67aODsJDaDuHdFMdPH8UJvj0UGRmaeLOJE+Mc8im5/O cwSS70sJLqmdBVxoFLyMV7l7l/cjZY2juFURoRqLCPB6j8fo7Wg1JvSiXMXtywUc4MCd 7HRQ== Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: AFqh2kqqsblAdayxa++IyCbstyV+aYTKkSqejSNryjJ/0+fPPztM3FAm HpuGtx1H2VuwKhemT6KzoZc= X-Google-Smtp-Source: AMrXdXvkr4QxokBJBKNELU5FcEW/TinHZ639aK0jRw77EI8iot+gAxwCwunylmWApTezUhwaVjPUrg== X-Received: by 2002:a05:6830:2007:b0:684:e4fd:354b with SMTP id e7-20020a056830200700b00684e4fd354bmr1515236otp.69.1674550584908; Tue, 24 Jan 2023 00:56:24 -0800 (PST) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:a05:6870:e896:b0:15f:93fd:8b47 with SMTP id q22-20020a056870e89600b0015f93fd8b47ls5722354oan.5.-pod-prod-gmail; Tue, 24 Jan 2023 00:56:22 -0800 (PST) X-Received: by 2002:a05:6870:bac7:b0:15b:bb9b:aae9 with SMTP id js7-20020a056870bac700b0015bbb9baae9mr2316244oab.63.1674550581728; Tue, 24 Jan 2023 00:56:21 -0800 (PST) In-Reply-To: <41d93efd-6895-4ce9-b857-a97b00ff2fb5n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> X-Original-Sender: aborruso-Re5JQEeQqe8AvxtiuMwx3w@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:32069 Archived-At: ------=_Part_446_2109883384.1674550580742 Content-Type: multipart/alternative; boundary="----=_Part_447_1448317702.1674550580742" ------=_Part_447_1448317702.1674550580742 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable I=E2=80=99m writing again the code, I have had formatting problems. The first is import pandas as pd df =3D pd.DataFrame({'text': ['foo', 'bar'],'number': [= 1,=20 2]}) dfStyler =3D df.style.set_properties(**{'text-align': 'center'})=20 dfStyler.set_table_styles([dict(selector=3D'th', props=3D[('text-align',=20 'center')])])=20 The second one is df.style.hide_index().set_table_attributes("class=3D'dataframe table-hover= =20 text-center'")=20 =E2=80=8B --=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/f5f5ca48-f81d-45c6-8869-101b4722fb5cn%40googlegroups.com. ------=_Part_447_1448317702.1674550580742 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

I=E2=80=99m writing again the code, I have had formatting problems.=

The first is

import pandas as pd df =3D pd.DataFrame({'text': ['foo', 'bar'<= /span>],'number': [1, 2]}) dfStyler =3D df.style.set_properties(**{'text-align': 'c= enter'}) dfStyler.set_table_styles([dict(selector=3D'th', props=3D[('text-align', 'center')])])

The second one is

df.style.hide_index().set_table_attributes("class=3D'data= frame table-hover text-center'")
=E2=80=8B

--
You received this message because you are subscribed to the Google Groups &= quot;pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an e= mail to pand= oc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
To view this discussion on the web visit https://groups.google.com/d= /msgid/pandoc-discuss/f5f5ca48-f81d-45c6-8869-101b4722fb5cn%40googlegroups.= com.
------=_Part_447_1448317702.1674550580742-- ------=_Part_446_2109883384.1674550580742--