<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0">
  <channel>
    <title>Thanks to antville.org</title>
    <link>https://oksoft.antville.org/</link>
    <description>Adding Value with limited resources</description>
    <language>en</language>
    <pubDate>Wed, 17 Jun 2026 19:05:31 GMT</pubDate>
    <dc:date>2026-06-17T19:05:31Z</dc:date>
    <dc:language>en</dc:language>
    <item>
      <title>setting colors in pandas</title>
      <link>https://oksoft.antville.org/stories/2286681/</link>
      <description>&lt;p&gt;This is how to set the colors in pandas&lt;/p&gt;&lt;p&gt;mapper = {v: k for k, v in enumerate(colors.unique())}&lt;/p&gt;&lt;p&gt;ccolors.cat.reorder_categories(mapper).cat.codes&lt;/p&gt;</description>
      <pubDate>Thu, 20 Feb 2020 05:53:49 GMT</pubDate>
      <guid>https://oksoft.antville.org/stories/2286681/</guid>
      <dc:creator>shantanuo</dc:creator>
      <dc:date>2020-02-20T05:53:49Z</dc:date>
    </item>
    <item>
      <title>apply colors to pandas</title>
      <link>https://oksoft.antville.org/stories/2285713/</link>
      <description>&lt;p&gt;Here is how to change the color of negative values to red in pandas.&lt;/p&gt;&lt;p&gt;def color_negative_red(val):color = 'red' if val &amp;lt; 0 else 'black'return 'color: %s' % color&lt;/p&gt;&lt;p&gt;df = df.style.applymap(color_negative_red)&lt;/p&gt;</description>
      <pubDate>Wed, 12 Feb 2020 08:57:51 GMT</pubDate>
      <guid>https://oksoft.antville.org/stories/2285713/</guid>
      <dc:creator>shantanuo</dc:creator>
      <dc:date>2020-02-12T08:57:51Z</dc:date>
    </item>
    <item>
      <title>14 days ago</title>
      <link>https://oksoft.antville.org/stories/2283385/</link>
      <description>&lt;p&gt;This is the python way of calculating the date that is 14 days ago.&lt;/p&gt;&lt;p&gt;import datetime(datetime.datetime.now() - datetime.timedelta(days = 14)).date()&lt;/p&gt;&lt;p&gt;And this is pandas way of getting the same results:&lt;/p&gt;&lt;p&gt;import pandas as pd(pd.datetime.today() - pd.offsets.Day(14)).floor('D')&lt;/p&gt;</description>
      <pubDate>Tue, 14 Jan 2020 14:26:42 GMT</pubDate>
      <guid>https://oksoft.antville.org/stories/2283385/</guid>
      <dc:creator>shantanuo</dc:creator>
      <dc:date>2020-01-14T14:26:42Z</dc:date>
    </item>
    <item>
      <title>Change default head rows from 5 to 3</title>
      <link>https://oksoft.antville.org/stories/2278381/</link>
      <description>&lt;p&gt;from functools import partialmethodpd.DataFrame.head = partialmethod(pd.DataFrame.head, n=3)&lt;/p&gt;</description>
      <pubDate>Thu, 03 Oct 2019 08:05:10 GMT</pubDate>
      <guid>https://oksoft.antville.org/stories/2278381/</guid>
      <dc:creator>shantanuo</dc:creator>
      <dc:date>2019-10-03T08:05:10Z</dc:date>
    </item>
    <item>
      <title>Infer types in pandas</title>
      <link>https://oksoft.antville.org/stories/2268266/</link>
      <description>&lt;p&gt;This will return the mixed datatypes but this can be slow.&lt;/p&gt;&lt;p&gt;df.applymap(type).nunique() &amp;gt; 1&lt;/p&gt;&lt;p&gt;Better approach pythonic approach would be...&lt;/p&gt;&lt;p&gt;from pandas.api.types import infer_dtype&lt;/p&gt;&lt;p&gt;infer_dtype(df.A)'mixed-integer'&lt;/p&gt;&lt;p&gt;df.apply(lambda x: 'mixed' in infer_dtype(x))&lt;/p&gt;</description>
      <pubDate>Sun, 16 Dec 2018 13:50:12 GMT</pubDate>
      <guid>https://oksoft.antville.org/stories/2268266/</guid>
      <dc:creator>shantanuo</dc:creator>
      <dc:date>2018-12-16T13:50:12Z</dc:date>
    </item>
    <item>
      <title>Python objects and methods</title>
      <link>https://oksoft.antville.org/stories/2264813/</link>
      <description>&lt;p&gt;Here are important python objects and their methodsint &lt;strong&gt;mul&lt;/strong&gt;, &lt;strong&gt;add&lt;/strong&gt;, &lt;strong&gt;eq&lt;/strong&gt;, &lt;strong&gt;ge&lt;/strong&gt;, &lt;strong&gt;mod&lt;/strong&gt;, &lt;strong&gt;pow&lt;/strong&gt;float .is_integer()string .upper(), .endswith(), .split()bool .numerator .&lt;strong&gt;abs&lt;/strong&gt;()list .append, .pop, &lt;strong&gt;len&lt;/strong&gt;() / slicingtupledict .items(), .keys(), .values() / slicingpd.Series .sum(), .stack(), .groupby(), .resample(), .sort_values(), .sort_index(), .ilocpd.DataFrame&lt;/p&gt;</description>
      <pubDate>Sat, 18 Aug 2018 13:11:11 GMT</pubDate>
      <guid>https://oksoft.antville.org/stories/2264813/</guid>
      <dc:creator>shantanuo</dc:creator>
      <dc:date>2018-08-18T13:11:11Z</dc:date>
    </item>
    <item>
      <title>JSON to DF</title>
      <link>https://oksoft.antville.org/stories/2264630/</link>
      <description>&lt;p&gt;Here is how to read a JSON file into pandas dataframe.&lt;/p&gt;&lt;p&gt;import jsonimport pandas as pd&lt;/p&gt;&lt;p&gt;with open('/tmp/aclImdb/movie_data/gv.json', 'r') as f:data = json.load(f)&lt;/p&gt;&lt;p&gt;df=pd.DataFrame(data['data'])df.to_excel('gov.xlsx')&lt;/p&gt;</description>
      <pubDate>Wed, 08 Aug 2018 11:12:27 GMT</pubDate>
      <guid>https://oksoft.antville.org/stories/2264630/</guid>
      <dc:creator>shantanuo</dc:creator>
      <dc:date>2018-08-08T11:12:27Z</dc:date>
    </item>
  </channel>
</rss>

