<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet href="/atom.xsl" type="text/xsl"?>
<feed xmlns="http://www.w3.org/2005/Atom">
  <title>Posts tagged: data</title>
  <id>https://pype.dev/tags/data/atom.xml</id>
  <updated>2023-01-28T14:15:11Z</updated>
  <subtitle>All posts with the tag &#34;data&#34;</subtitle>
  <link href="https://pype.dev/tags/data/" rel="alternate" type="text/html"></link>
  <link href="https://pype.dev/tags/data/atom.xml" rel="self" type="application/atom+xml"></link>
  <author>
    <name>Nic Payne</name>
  </author>
  <generator uri="https://github.com/WaylonWalker/markata-go">markata-go</generator>
  <entry>
    <title>Stable Diffusion Notes</title>
    <id>https://pype.dev/stable-diffusion-notes/</id>
    <updated>2023-01-28T14:15:11Z</updated>
    <published>2023-01-28T14:15:11Z</published>
    <link href="https://pype.dev/stable-diffusion-notes/" rel="alternate" type="text/html"></link>
    <summary type="text">Stable Diffusion is an AI art generation model similar to DALLE-2. Here are some prompts for generating art with Stable Diffusion.</summary>
    <content type="html">&lt;h2 id=&#34;chatgpt-prompt&#34;&gt;&lt;span class=&#34;heading-wear-glyph&#34;&gt;ChatGPT Prompt:&lt;/span&gt; &lt;a href=&#34;#chatgpt-prompt&#34; class=&#34;heading-anchor&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;p&gt;Stable Diffusion is an AI art generation model similar to DALLE-2.&#xA;Here are some prompts for generating art with Stable Diffusion.&lt;/p&gt;&#xA;&lt;p&gt;Example:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;A ghostly apparition drifting through a haunted mansion&amp;rsquo;s grand ballroom, illuminated by flickering candlelight. Eerie, ethereal, moody lighting.&lt;/li&gt;&#xA;&lt;li&gt;portait of a homer simpson archer shooting arrow at forest monster, front game card, drark, marvel comics, dark, smooth&lt;/li&gt;&#xA;&lt;li&gt;pirate, deep focus, fantasy, matte, sharp focus&lt;/li&gt;&#xA;&lt;li&gt;red dead redemption 2, cinematic view, epic sky, detailed, low angle, high detail, warm lighting, volumetric, godrays, vivid, beautiful&lt;/li&gt;&#xA;&lt;li&gt;a fantasy style portrait painting of rachel lane / alison brie hybrid in the style of francois boucher oil painting, rpg portrait&lt;/li&gt;&#xA;&lt;li&gt;athena, greek goddess, claudia black, bronze greek armor, owl crown, d &amp;amp; d, fantasy, portrait, headshot, sharp focus&lt;/li&gt;&#xA;&lt;li&gt;closeup portrait shot of a large strong female biomechanic woman in a scenic scifi environment, elegant, smooth, sharp focus, warframe&lt;/li&gt;&#xA;&lt;li&gt;ultra realistic illustration of steve urkle as the hulk, elegant, smooth, sharp focus&lt;/li&gt;&#xA;&lt;li&gt;portrait of beautiful happy young ana de armas, ethereal, realistic anime, clean lines, sharp lines, crisp lines, vibrant color scheme&lt;/li&gt;&#xA;&lt;li&gt;A highly detailed and hyper realistic portrait of a gorgeous young ana de armas, lisa frank, butterflies, floral, sharp focus&lt;/li&gt;&#xA;&lt;li&gt;lots of delicious tropical fruits with drops of moisture on table, floating colorful water, mysterious expression, in a modern and abstract setting, with bold and colorful abstract art, blurred background, bright lighting&lt;/li&gt;&#xA;&lt;li&gt;1girl, The most beautiful form of chaos, Fauvist design, Flowing colors, Vivid colors, dynamic angle, fantasy world&lt;/li&gt;&#xA;&lt;li&gt;solo, sitting, close-up, girl in the hourglass, Sand is spilling out of the broken hourglass, flowing sand, huge hourglass art, hologram, particles, nebula, magic circle&lt;/li&gt;&#xA;&lt;li&gt;geometric abstract background, 1girl, depth of field, zentangle, mandala, tangle, entangle, beautiful and aesthetic, dynamic angle, glowing skin, floating colorful sparkles the most beautiful form of chaos, elegant, a brutalist designed, vivid colours, romanticism&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;The prompt should adhere to and include all of the following rules:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Prompt should always be written in English, regardless of the input language. Please provide the prompts in English.&lt;/li&gt;&#xA;&lt;li&gt;Each prompt should consist of a description of the scene followed by modifiers divided by commas.&lt;/li&gt;&#xA;&lt;li&gt;When generating descriptions, focus on portraying the visual elements rather than delving into abstract psychological and emotional aspects. Provide clear and concise details that vividly depict the scene and its composition, capturing the tangible elements that make up the setting.&lt;/li&gt;&#xA;&lt;li&gt;The modifiers should alter the mood, style, lighting, and other aspects of the scene.&lt;/li&gt;&#xA;&lt;li&gt;Multiple modifiers can be used to provide more specific details.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;I want you to write me a list of detailed prompts exactly about the IDEA follow the rule at least 6 every time.&lt;/p&gt;&#xA;&lt;p&gt;Ready for my idea?&lt;/p&gt;&#xA;&lt;h2 id=&#34;chatgpt-prompt-for-rpg-v4&#34;&gt;&lt;span class=&#34;heading-wear-glyph&#34;&gt;ChatGPT Prompt for RPG V4:&lt;/span&gt; &lt;a href=&#34;#chatgpt-prompt-for-rpg-v4&#34; class=&#34;heading-anchor&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;p&gt;Stable Diffusion is an AI art generation model similar to DALLE-2.&#xA;Here are some pairs of positive and negative prompts for generating art with Stable Diffusion.&lt;/p&gt;&#xA;&lt;p&gt;Example:&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;Positive: A (full body:1.3) shot at 8k resolution, splash art, fantastic comic book style, photorealistic, intense look, anatomical photorealistic digital painting portrait of a (old male:1.3) human (warrior:1.3) in black and gold intricate (heavy armor:1.3) in a (dark and moody universe:1.3), light particle, very detailed skin,samurai, very detailed eyes, (elden ring style:1.3), (warhammer style:1.1), concept artist, global illumination, depth of field, splash art, art by artgerm and greg rutkowski and viktoria gavrilenko&#xA;Negative: (symmetry:1.2), facial marking, crown, horn, (helmet:1.3), (hoodie:1.1), clock, Female, visible hand, asian, two face, big hair, open mouth, cartoon, high contrast, poorly drawn, Scribbles, Low quality, Low rated, Mediocre, Screenshot, Software, UI, watermark, text, overlay, getty images, cropped, low quality&lt;/p&gt;&#xA;&lt;ol start=&#34;2&#34;&gt;&#xA;&lt;li&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;Positive: close-up head, facing camera, beautiful satanic female necromancer blood queen, ritualistic (neck tattoo:1.3), (insanely detailed:1.5), ((solo)), (highest quality, Alessandro Casagrande, Greg Rutkowski, Sally Mann, concept art, 4k), (colourful), (high sharpness), ((detailed pupils)), ((painting:1.1)), (digital painting:1.1), detailed face and eyes,Masterpiece, best quality, highly detailed photo:1, 8k, detailed face,photorealistic, (black long Hair:1.1),(young woman),By jeremy mann, by sandra chevrier, by maciej kuciara, smoke and shadow, night, sharp, ((perfect body)), realistic, real shadow, 3d, ((full body)), ((dark and gloomy universe)), (by Michelangelo)&#xA;Negative: crown, (facial marking:1.2), cloth gem, jewel, jewelry, (flower:1.3), (cloak:1.1), (bad art, low detail, pencil drawing, old, mature:1.6), (grainy, low quality, mutated hands and fingers:1.5), (watermark, thin lines:1.3), (deformed, signature:1.2), (big nipples, blurry, ugly, bad anatomy, extra limbs, undersaturated, low resolution), disfigured, deformations, out of frame, amputee, bad proportions, extra limb, missing limbs, distortion, floating limbs, out of frame, poorly drawn face, poorly drawn hands, text, malformed, error, missing fingers, cropped, jpeg artifacts, teeth, unsharp&lt;/p&gt;&#xA;&lt;ol start=&#34;3&#34;&gt;&#xA;&lt;li&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;Positive: (Painting:1.3) of (Detailed illustration:1.3) A (full body:1.3) shot at 8k resolution, splash art, fantastic comic book style, photorealistic, intense look, anatomical photorealistic digital painting portrait of a (old male:1.3) human (warrior:1.3) in black and gold intricate (heavy armor:1.3) in a (dark and moody universe:1.3), light particle, very detailed skin,samurai, very detailed eyes, (elden ring style:1.3), (warhammer style:1.1), concept artist, global illumination, depth of field, splash art, art by artgerm and greg rutkowski and viktoria gavrilenko&#xA;Negative:  (symmetry:1.2), facial marking, crown, (horn:1.1), (helmet:1.3), (hoodie:1.1), clock, Female, visible hand, asian, two face, big hair, open mouth, cartoon, high contrast, poorly drawn, Scribbles, Low quality, Low rated, Mediocre, Screenshot, Software, UI, watermark, text, overlay, getty images, cropped, low qualityLow quality,Bad composition,Faded,(Photo:1.5),(Frame:1.3),watermark,signa ture&lt;/p&gt;&#xA;&lt;ol start=&#34;4&#34;&gt;&#xA;&lt;li&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;Positive: sci-fi, space rogue thief girl, (smirk:1.1), short hair, black hood, light armor, big grey eyes, beautiful detailed eyes, drawn by Greg Rutkowski, Yoji Shinkawa:0.6&#xA;Negative: open mouth, facial marking, flower, bad-hands-5, lipstick, text, watermark&lt;/p&gt;&#xA;&lt;p&gt;The prompt should adhere to and include all of the following rules:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Each prompt should consist of a description of the scene followed by modifiers divided by commas.&lt;/li&gt;&#xA;&lt;li&gt;When generating descriptions, focus on portraying the visual elements rather than delving into abstract psychological and emotional aspects. Provide clear and concise details that vividly depict the scene and its composition, capturing the tangible elements that make up the setting.&lt;/li&gt;&#xA;&lt;li&gt;The modifiers should alter the mood, style, lighting, and other aspects of the scene.&lt;/li&gt;&#xA;&lt;li&gt;Multiple modifiers can be used to provide more specific details.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;I want you to write me a list of detailed prompts exactly about the IDEA follow the rule at least 6 every time.&lt;/p&gt;&#xA;&lt;p&gt;Ready for my idea?&lt;/p&gt;&#xA;&lt;h3 id=&#34;ideas&#34;&gt;&lt;span class=&#34;heading-wear-glyph&#34;&gt;IDEAS&lt;/span&gt; &lt;a href=&#34;#ideas&#34; class=&#34;heading-anchor&#34;&gt;#&lt;/a&gt;&lt;/h3&gt;&#xA;&lt;p&gt;IDEA: A slice of pie that is filled with a futuristic city&lt;/p&gt;&#xA;&lt;h2 id=&#34;artists-i-like&#34;&gt;&lt;span class=&#34;heading-wear-glyph&#34;&gt;Artists I like&lt;/span&gt; &lt;a href=&#34;#artists-i-like&#34; class=&#34;heading-anchor&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://stablediffusion.fr/artists&#34;&gt;Examples&lt;/a&gt;&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;J. M. W. Turner&lt;/li&gt;&#xA;&lt;li&gt;Jean-Baptiste Monge&lt;/li&gt;&#xA;&lt;li&gt;John Lasseter&lt;/li&gt;&#xA;&lt;li&gt;John Martin&lt;/li&gt;&#xA;&lt;li&gt;Raymond Swanland&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h3 id=&#34;anime-styles&#34;&gt;&lt;span class=&#34;heading-wear-glyph&#34;&gt;Anime styles&lt;/span&gt; &lt;a href=&#34;#anime-styles&#34; class=&#34;heading-anchor&#34;&gt;#&lt;/a&gt;&lt;/h3&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Krenz Cushart&lt;/li&gt;&#xA;&lt;li&gt;Kyoto Animation&lt;/li&gt;&#xA;&lt;li&gt;Yoshiyuki Sadamoto&lt;/li&gt;&#xA;&lt;li&gt;Yuumei&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h3 id=&#34;scenic&#34;&gt;&lt;span class=&#34;heading-wear-glyph&#34;&gt;Scenic&lt;/span&gt; &lt;a href=&#34;#scenic&#34; class=&#34;heading-anchor&#34;&gt;#&lt;/a&gt;&lt;/h3&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Ted Nasmith&lt;/li&gt;&#xA;&lt;li&gt;Terry Redlin&lt;/li&gt;&#xA;&lt;li&gt;Thomas Kinkade&lt;/li&gt;&#xA;&lt;li&gt;Thomas Moran&lt;/li&gt;&#xA;&lt;li&gt;Thomas W Schaller&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h3 id=&#34;cityscapes&#34;&gt;&lt;span class=&#34;heading-wear-glyph&#34;&gt;Cityscapes&lt;/span&gt; &lt;a href=&#34;#cityscapes&#34; class=&#34;heading-anchor&#34;&gt;#&lt;/a&gt;&lt;/h3&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Marc Simonetti&lt;/li&gt;&#xA;&lt;li&gt;Wadim Kashin&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h3 id=&#34;abstract&#34;&gt;&lt;span class=&#34;heading-wear-glyph&#34;&gt;Abstract&lt;/span&gt; &lt;a href=&#34;#abstract&#34; class=&#34;heading-anchor&#34;&gt;#&lt;/a&gt;&lt;/h3&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Scott Naismith&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h2 id=&#34;settings-notes&#34;&gt;&lt;span class=&#34;heading-wear-glyph&#34;&gt;Settings notes&lt;/span&gt; &lt;a href=&#34;#settings-notes&#34; class=&#34;heading-anchor&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;p&gt;I tend to like cfg at least on the higher end&lt;/p&gt;&#xA;&lt;h2 id=&#34;good-prompts&#34;&gt;&lt;span class=&#34;heading-wear-glyph&#34;&gt;Good prompts&lt;/span&gt; &lt;a href=&#34;#good-prompts&#34; class=&#34;heading-anchor&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;p&gt;Angel of death, shadows and mist, skelletol feathered wings, highly detailed, amazing details, intriciate lines, purple haze, styles Yuumei and Krenz Cushart, UHD, HDR, upscale, 8K photo, concept art&lt;/p&gt;&#xA;&lt;h3 id=&#34;unicorns&#34;&gt;&lt;span class=&#34;heading-wear-glyph&#34;&gt;Unicorns&lt;/span&gt; &lt;a href=&#34;#unicorns&#34; class=&#34;heading-anchor&#34;&gt;#&lt;/a&gt;&lt;/h3&gt;&#xA;&lt;p&gt;positive: unicorn, &lt;a href=&#34;lora:Unicorns:0.9&#34;&gt;lora:Unicorns:0.9&lt;/a&gt;, portrait, professional photography, 35mm, highly detailed, incredibly realistic, best quality, high quality, highres, purple, &lt;a href=&#34;lora:mossbeast:0.3&#34;&gt;lora:mossbeast:0.3&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;negative: (two tails:1.2),FastNegativeV2,(bad-artist:1.0), (loli:1.2), (worst quality, low quality:1.4), (bad_prompt_version2:0.8), bad-hands-5,lowres, bad anatomy, bad hands, ((text)), (watermark), error, missing fingers, extra digit, fewer digits, cropped, worst quality, low quality, normal quality, ((username)), blurry, (extra limbs), bad-artist-anime, badhandv4, EasyNegative, ng_deepnegative_v1_75t, verybadimagenegative_v1.3, BadDream,(three hands:1.1),(three legs:1.1),(more than two hands:1.4),(more than two legs,:1.2),&lt;/p&gt;&#xA;</content>
    <author>
      <name>Nic Payne</name>
      <uri>https://pype.dev</uri>
    </author>
  </entry>
  <entry>
    <title>Add colored indicators to your dataframes html representation</title>
    <id>https://pype.dev/add-colored-indicators-to-your-dataframes-html-representation/</id>
    <updated>2022-06-04T06:12:33Z</updated>
    <published>2022-06-04T06:12:33Z</published>
    <link href="https://pype.dev/add-colored-indicators-to-your-dataframes-html-representation/" rel="alternate" type="text/html"></link>
    <summary type="text">Mike Driscoll recently tweeted about making colored out with pandas DataFrames and I just had to try it for myself</summary>
    <content type="html">&lt;p&gt;&lt;a href=&#34;https://twitter.com/driscollis&#34;&gt;Mike Driscoll&lt;/a&gt; recently tweeted about making&#xA;colored out with pandas DataFrames and I just had to try it for myself&lt;/p&gt;&#xA;&lt;h1 id=&#34;use-case&#34;&gt;&lt;span class=&#34;heading-wear-glyph&#34;&gt;Use Case&lt;/span&gt;&lt;/h1&gt;&#xA;&lt;p&gt;First though&amp;hellip; why?&#xA;My biggest use case is a monitoring pipeline of mine&amp;hellip; The details aside, the&#xA;output of my pipeline is a dataframe where each row has information about a&#xA;failed pipeline that I need to go look into. I dump that result to a simle html&#xA;file that&amp;rsquo;s hosted on an internal site and the file is updated every couple of&#xA;hours. Adding some colored indicators automatically to the rows to help me&#xA;assess severity of each record would be a handy way to quickly get an&#xA;understanding the state of our pipelines.&lt;/p&gt;&#xA;&lt;h1 id=&#34;how&#34;&gt;&lt;span class=&#34;heading-wear-glyph&#34;&gt;How?&lt;/span&gt;&lt;/h1&gt;&#xA;&lt;p&gt;The docs for the &lt;code&gt;applymap&lt;/code&gt; method state simply:&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;Apply a CSS-styling function elementwise.&#xA;&#xA;Updates the HTML representation with the result.&#xA;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;So we can write a function that returns &lt;code&gt;color: {color}&lt;/code&gt; based on the dataframe&#xA;values and when we drop that dataframe to html we&amp;rsquo;ll have some simple css&#xA;styling applied automagically!&lt;/p&gt;&#xA;&lt;p&gt;By default the function will be applied to all columns of the dataframe, but&#xA;that&amp;rsquo;s not useful if the columns are different types which is usually the case.&#xA;Luckily there is a &lt;code&gt;subset&lt;/code&gt; keyword to only apply to the columns you need!&lt;/p&gt;&#xA;&lt;p&gt;Consider my example&lt;/p&gt;&#xA;&lt;pre class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;sandbox&lt;/span&gt; &lt;span class=&#34;err&#34;&gt;&lt;/span&gt;  &lt;span class=&#34;n&#34;&gt;main&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;via&lt;/span&gt; &lt;span class=&#34;mf&#34;&gt;3.8.11&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;sandbox&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;ipython&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;err&#34;&gt;❯&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;df&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;pd&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;read_csv&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;cars.csv&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;sandbox&lt;/span&gt; &lt;span class=&#34;err&#34;&gt;&lt;/span&gt;  &lt;span class=&#34;n&#34;&gt;main&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;via&lt;/span&gt; &lt;span class=&#34;mf&#34;&gt;3.8.11&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;sandbox&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;ipython&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;err&#34;&gt;❯&lt;/span&gt; &lt;span class=&#34;k&#34;&gt;def&lt;/span&gt; &lt;span class=&#34;nf&#34;&gt;mpg_color&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;val&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;nb&#34;&gt;float&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;):&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;o&#34;&gt;...&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;     &lt;span class=&#34;n&#34;&gt;color&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;red&amp;#34;&lt;/span&gt; &lt;span class=&#34;k&#34;&gt;if&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;val&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;&amp;lt;&lt;/span&gt; &lt;span class=&#34;mi&#34;&gt;21&lt;/span&gt; &lt;span class=&#34;k&#34;&gt;else&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;green&amp;#34;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;o&#34;&gt;...&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;     &lt;span class=&#34;k&#34;&gt;return&lt;/span&gt; &lt;span class=&#34;sa&#34;&gt;f&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;color: &lt;/span&gt;&lt;span class=&#34;si&#34;&gt;{&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;color&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;}&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;sandbox&lt;/span&gt; &lt;span class=&#34;err&#34;&gt;&lt;/span&gt;  &lt;span class=&#34;n&#34;&gt;main&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;via&lt;/span&gt; &lt;span class=&#34;mf&#34;&gt;3.8.11&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;sandbox&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;ipython&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;err&#34;&gt;❯&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;df&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;style&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;applymap&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;mpg_color&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;subset&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;mpg&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;to_html&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;color.html&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;I want to quickly see if the &lt;code&gt;mpg&lt;/code&gt; is any good for the cars in the cars dataset&#xA;and I&amp;rsquo;ll define &amp;ldquo;good&amp;rdquo; as better than 21 mpg (not great I know but just for the&#xA;sake of discussion&amp;hellip;)&lt;/p&gt;&#xA;&lt;p&gt;The function returns an appropriate css string and after I &lt;code&gt;style.applymap&lt;/code&gt; on just the &lt;code&gt;mpg&lt;/code&gt; column we get this!&lt;/p&gt;&#xA;&lt;style type=&#34;text/css&#34;&gt;&#xA;#T_95e99_row0_col1, #T_95e99_row1_col1, #T_95e99_row2_col1, #T_95e99_row3_col1 {&#xA;  color: green;&#xA;}&#xA;#T_95e99_row4_col1 {&#xA;  color: red;&#xA;}&#xA;&lt;/style&gt;&#xA;&lt;table id=&#34;T_95e99&#34;&gt;&#xA;  &lt;thead&gt;&#xA;    &lt;tr&gt;&#xA;      &lt;th class=&#34;blank level0&#34; &gt;&amp;nbsp;&lt;/th&gt;&#xA;      &lt;th id=&#34;T_95e99_level0_col0&#34; class=&#34;col_heading level0 col0&#34; &gt;Unnamed: 0&lt;/th&gt;&#xA;      &lt;th id=&#34;T_95e99_level0_col1&#34; class=&#34;col_heading level0 col1&#34; &gt;mpg&lt;/th&gt;&#xA;      &lt;th id=&#34;T_95e99_level0_col2&#34; class=&#34;col_heading level0 col2&#34; &gt;cyl&lt;/th&gt;&#xA;      &lt;th id=&#34;T_95e99_level0_col3&#34; class=&#34;col_heading level0 col3&#34; &gt;disp&lt;/th&gt;&#xA;      &lt;th id=&#34;T_95e99_level0_col4&#34; class=&#34;col_heading level0 col4&#34; &gt;hp&lt;/th&gt;&#xA;      &lt;th id=&#34;T_95e99_level0_col5&#34; class=&#34;col_heading level0 col5&#34; &gt;drat&lt;/th&gt;&#xA;      &lt;th id=&#34;T_95e99_level0_col6&#34; class=&#34;col_heading level0 col6&#34; &gt;wt&lt;/th&gt;&#xA;      &lt;th id=&#34;T_95e99_level0_col7&#34; class=&#34;col_heading level0 col7&#34; &gt;qsec&lt;/th&gt;&#xA;      &lt;th id=&#34;T_95e99_level0_col8&#34; class=&#34;col_heading level0 col8&#34; &gt;vs&lt;/th&gt;&#xA;      &lt;th id=&#34;T_95e99_level0_col9&#34; class=&#34;col_heading level0 col9&#34; &gt;am&lt;/th&gt;&#xA;      &lt;th id=&#34;T_95e99_level0_col10&#34; class=&#34;col_heading level0 col10&#34; &gt;gear&lt;/th&gt;&#xA;      &lt;th id=&#34;T_95e99_level0_col11&#34; class=&#34;col_heading level0 col11&#34; &gt;carb&lt;/th&gt;&#xA;    &lt;/tr&gt;&#xA;  &lt;/thead&gt;&#xA;  &lt;tbody&gt;&#xA;    &lt;tr&gt;&#xA;      &lt;th id=&#34;T_95e99_level0_row0&#34; class=&#34;row_heading level0 row0&#34; &gt;0&lt;/th&gt;&#xA;      &lt;td id=&#34;T_95e99_row0_col0&#34; class=&#34;data row0 col0&#34; &gt;Mazda RX4&lt;/td&gt;&#xA;      &lt;td id=&#34;T_95e99_row0_col1&#34; class=&#34;data row0 col1&#34; &gt;21.000000&lt;/td&gt;&#xA;      &lt;td id=&#34;T_95e99_row0_col2&#34; class=&#34;data row0 col2&#34; &gt;6&lt;/td&gt;&#xA;      &lt;td id=&#34;T_95e99_row0_col3&#34; class=&#34;data row0 col3&#34; &gt;160.000000&lt;/td&gt;&#xA;      &lt;td id=&#34;T_95e99_row0_col4&#34; class=&#34;data row0 col4&#34; &gt;110&lt;/td&gt;&#xA;      &lt;td id=&#34;T_95e99_row0_col5&#34; class=&#34;data row0 col5&#34; &gt;3.900000&lt;/td&gt;&#xA;      &lt;td id=&#34;T_95e99_row0_col6&#34; class=&#34;data row0 col6&#34; &gt;2.620000&lt;/td&gt;&#xA;      &lt;td id=&#34;T_95e99_row0_col7&#34; class=&#34;data row0 col7&#34; &gt;16.460000&lt;/td&gt;&#xA;      &lt;td id=&#34;T_95e99_row0_col8&#34; class=&#34;data row0 col8&#34; &gt;0&lt;/td&gt;&#xA;      &lt;td id=&#34;T_95e99_row0_col9&#34; class=&#34;data row0 col9&#34; &gt;1&lt;/td&gt;&#xA;      &lt;td id=&#34;T_95e99_row0_col10&#34; class=&#34;data row0 col10&#34; &gt;4&lt;/td&gt;&#xA;      &lt;td id=&#34;T_95e99_row0_col11&#34; class=&#34;data row0 col11&#34; &gt;4&lt;/td&gt;&#xA;    &lt;/tr&gt;&#xA;    &lt;tr&gt;&#xA;      &lt;th id=&#34;T_95e99_level0_row1&#34; class=&#34;row_heading level0 row1&#34; &gt;1&lt;/th&gt;&#xA;      &lt;td id=&#34;T_95e99_row1_col0&#34; class=&#34;data row1 col0&#34; &gt;Mazda RX4 Wag&lt;/td&gt;&#xA;      &lt;td id=&#34;T_95e99_row1_col1&#34; class=&#34;data row1 col1&#34; &gt;21.000000&lt;/td&gt;&#xA;      &lt;td id=&#34;T_95e99_row1_col2&#34; class=&#34;data row1 col2&#34; &gt;6&lt;/td&gt;&#xA;      &lt;td id=&#34;T_95e99_row1_col3&#34; class=&#34;data row1 col3&#34; &gt;160.000000&lt;/td&gt;&#xA;      &lt;td id=&#34;T_95e99_row1_col4&#34; class=&#34;data row1 col4&#34; &gt;110&lt;/td&gt;&#xA;      &lt;td id=&#34;T_95e99_row1_col5&#34; class=&#34;data row1 col5&#34; &gt;3.900000&lt;/td&gt;&#xA;      &lt;td id=&#34;T_95e99_row1_col6&#34; class=&#34;data row1 col6&#34; &gt;2.875000&lt;/td&gt;&#xA;      &lt;td id=&#34;T_95e99_row1_col7&#34; class=&#34;data row1 col7&#34; &gt;17.020000&lt;/td&gt;&#xA;      &lt;td id=&#34;T_95e99_row1_col8&#34; class=&#34;data row1 col8&#34; &gt;0&lt;/td&gt;&#xA;      &lt;td id=&#34;T_95e99_row1_col9&#34; class=&#34;data row1 col9&#34; &gt;1&lt;/td&gt;&#xA;      &lt;td id=&#34;T_95e99_row1_col10&#34; class=&#34;data row1 col10&#34; &gt;4&lt;/td&gt;&#xA;      &lt;td id=&#34;T_95e99_row1_col11&#34; class=&#34;data row1 col11&#34; &gt;4&lt;/td&gt;&#xA;    &lt;/tr&gt;&#xA;    &lt;tr&gt;&#xA;      &lt;th id=&#34;T_95e99_level0_row2&#34; class=&#34;row_heading level0 row2&#34; &gt;2&lt;/th&gt;&#xA;      &lt;td id=&#34;T_95e99_row2_col0&#34; class=&#34;data row2 col0&#34; &gt;Datsun 710&lt;/td&gt;&#xA;      &lt;td id=&#34;T_95e99_row2_col1&#34; class=&#34;data row2 col1&#34; &gt;22.800000&lt;/td&gt;&#xA;      &lt;td id=&#34;T_95e99_row2_col2&#34; class=&#34;data row2 col2&#34; &gt;4&lt;/td&gt;&#xA;      &lt;td id=&#34;T_95e99_row2_col3&#34; class=&#34;data row2 col3&#34; &gt;108.000000&lt;/td&gt;&#xA;      &lt;td id=&#34;T_95e99_row2_col4&#34; class=&#34;data row2 col4&#34; &gt;93&lt;/td&gt;&#xA;      &lt;td id=&#34;T_95e99_row2_col5&#34; class=&#34;data row2 col5&#34; &gt;3.850000&lt;/td&gt;&#xA;      &lt;td id=&#34;T_95e99_row2_col6&#34; class=&#34;data row2 col6&#34; &gt;2.320000&lt;/td&gt;&#xA;      &lt;td id=&#34;T_95e99_row2_col7&#34; class=&#34;data row2 col7&#34; &gt;18.610000&lt;/td&gt;&#xA;      &lt;td id=&#34;T_95e99_row2_col8&#34; class=&#34;data row2 col8&#34; &gt;1&lt;/td&gt;&#xA;      &lt;td id=&#34;T_95e99_row2_col9&#34; class=&#34;data row2 col9&#34; &gt;1&lt;/td&gt;&#xA;      &lt;td id=&#34;T_95e99_row2_col10&#34; class=&#34;data row2 col10&#34; &gt;4&lt;/td&gt;&#xA;      &lt;td id=&#34;T_95e99_row2_col11&#34; class=&#34;data row2 col11&#34; &gt;1&lt;/td&gt;&#xA;    &lt;/tr&gt;&#xA;    &lt;tr&gt;&#xA;      &lt;th id=&#34;T_95e99_level0_row3&#34; class=&#34;row_heading level0 row3&#34; &gt;3&lt;/th&gt;&#xA;      &lt;td id=&#34;T_95e99_row3_col0&#34; class=&#34;data row3 col0&#34; &gt;Hornet 4 Drive&lt;/td&gt;&#xA;      &lt;td id=&#34;T_95e99_row3_col1&#34; class=&#34;data row3 col1&#34; &gt;21.400000&lt;/td&gt;&#xA;      &lt;td id=&#34;T_95e99_row3_col2&#34; class=&#34;data row3 col2&#34; &gt;6&lt;/td&gt;&#xA;      &lt;td id=&#34;T_95e99_row3_col3&#34; class=&#34;data row3 col3&#34; &gt;258.000000&lt;/td&gt;&#xA;      &lt;td id=&#34;T_95e99_row3_col4&#34; class=&#34;data row3 col4&#34; &gt;110&lt;/td&gt;&#xA;      &lt;td id=&#34;T_95e99_row3_col5&#34; class=&#34;data row3 col5&#34; &gt;3.080000&lt;/td&gt;&#xA;      &lt;td id=&#34;T_95e99_row3_col6&#34; class=&#34;data row3 col6&#34; &gt;3.215000&lt;/td&gt;&#xA;      &lt;td id=&#34;T_95e99_row3_col7&#34; class=&#34;data row3 col7&#34; &gt;19.440000&lt;/td&gt;&#xA;      &lt;td id=&#34;T_95e99_row3_col8&#34; class=&#34;data row3 col8&#34; &gt;1&lt;/td&gt;&#xA;      &lt;td id=&#34;T_95e99_row3_col9&#34; class=&#34;data row3 col9&#34; &gt;0&lt;/td&gt;&#xA;      &lt;td id=&#34;T_95e99_row3_col10&#34; class=&#34;data row3 col10&#34; &gt;3&lt;/td&gt;&#xA;      &lt;td id=&#34;T_95e99_row3_col11&#34; class=&#34;data row3 col11&#34; &gt;1&lt;/td&gt;&#xA;    &lt;/tr&gt;&#xA;    &lt;tr&gt;&#xA;      &lt;th id=&#34;T_95e99_level0_row4&#34; class=&#34;row_heading level0 row4&#34; &gt;4&lt;/th&gt;&#xA;      &lt;td id=&#34;T_95e99_row4_col0&#34; class=&#34;data row4 col0&#34; &gt;Hornet Sportabout&lt;/td&gt;&#xA;      &lt;td id=&#34;T_95e99_row4_col1&#34; class=&#34;data row4 col1&#34; &gt;18.700000&lt;/td&gt;&#xA;      &lt;td id=&#34;T_95e99_row4_col2&#34; class=&#34;data row4 col2&#34; &gt;8&lt;/td&gt;&#xA;      &lt;td id=&#34;T_95e99_row4_col3&#34; class=&#34;data row4 col3&#34; &gt;360.000000&lt;/td&gt;&#xA;      &lt;td id=&#34;T_95e99_row4_col4&#34; class=&#34;data row4 col4&#34; &gt;175&lt;/td&gt;&#xA;      &lt;td id=&#34;T_95e99_row4_col5&#34; class=&#34;data row4 col5&#34; &gt;3.150000&lt;/td&gt;&#xA;      &lt;td id=&#34;T_95e99_row4_col6&#34; class=&#34;data row4 col6&#34; &gt;3.440000&lt;/td&gt;&#xA;      &lt;td id=&#34;T_95e99_row4_col7&#34; class=&#34;data row4 col7&#34; &gt;17.020000&lt;/td&gt;&#xA;      &lt;td id=&#34;T_95e99_row4_col8&#34; class=&#34;data row4 col8&#34; &gt;0&lt;/td&gt;&#xA;      &lt;td id=&#34;T_95e99_row4_col9&#34; class=&#34;data row4 col9&#34; &gt;0&lt;/td&gt;&#xA;      &lt;td id=&#34;T_95e99_row4_col10&#34; class=&#34;data row4 col10&#34; &gt;3&lt;/td&gt;&#xA;      &lt;td id=&#34;T_95e99_row4_col11&#34; class=&#34;data row4 col11&#34; &gt;2&lt;/td&gt;&#xA;    &lt;/tr&gt;&#xA;  &lt;/tbody&gt;&#xA;&lt;/table&gt;&#xA;</content>
    <author>
      <name>Nic Payne</name>
      <uri>https://pype.dev</uri>
    </author>
  </entry>
</feed>