<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic How to make a loop including a dataframe for each jobname in Deployment Architecture</title>
    <link>https://community.splunk.com/t5/Deployment-Architecture/How-to-make-a-loop-including-a-dataframe-for-each-jobname/m-p/402272#M14518</link>
    <description>&lt;P&gt;I have a dataset like this: &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;jobname     date                   avg      start             end
A              30/03/2019            84900  03:13:25           20:59:47
B              02/04/2019            60798  16:53:05           16:00:05
C              02/04/2019            60798  16:53:05           16:00:04
D              02/04/2019            79200  22:00:01           15:00:39
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The length is 100k, and I need to do a loop including a dataframe for each jobname, for example:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;df1 = A, 30/03/2019, 84900, 03:13:25,20:59:47
df2 = B, 02/04/2019,60798,16:53:05,16:00:05
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;So I can use the kmeans algorithm to cluster all of the data.&lt;/P&gt;

&lt;P&gt;How can I do this?&lt;/P&gt;</description>
    <pubDate>Mon, 03 Jun 2019 14:16:25 GMT</pubDate>
    <dc:creator>nsantiago17</dc:creator>
    <dc:date>2019-06-03T14:16:25Z</dc:date>
    <item>
      <title>How to make a loop including a dataframe for each jobname</title>
      <link>https://community.splunk.com/t5/Deployment-Architecture/How-to-make-a-loop-including-a-dataframe-for-each-jobname/m-p/402272#M14518</link>
      <description>&lt;P&gt;I have a dataset like this: &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;jobname     date                   avg      start             end
A              30/03/2019            84900  03:13:25           20:59:47
B              02/04/2019            60798  16:53:05           16:00:05
C              02/04/2019            60798  16:53:05           16:00:04
D              02/04/2019            79200  22:00:01           15:00:39
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The length is 100k, and I need to do a loop including a dataframe for each jobname, for example:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;df1 = A, 30/03/2019, 84900, 03:13:25,20:59:47
df2 = B, 02/04/2019,60798,16:53:05,16:00:05
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;So I can use the kmeans algorithm to cluster all of the data.&lt;/P&gt;

&lt;P&gt;How can I do this?&lt;/P&gt;</description>
      <pubDate>Mon, 03 Jun 2019 14:16:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Deployment-Architecture/How-to-make-a-loop-including-a-dataframe-for-each-jobname/m-p/402272#M14518</guid>
      <dc:creator>nsantiago17</dc:creator>
      <dc:date>2019-06-03T14:16:25Z</dc:date>
    </item>
    <item>
      <title>Re: How to make a loop including a dataframe for each jobname</title>
      <link>https://community.splunk.com/t5/Deployment-Architecture/How-to-make-a-loop-including-a-dataframe-for-each-jobname/m-p/402273#M14519</link>
      <description>&lt;P&gt;Hi There,&lt;/P&gt;

&lt;P&gt;What's the end use case you're trying to achieve here? I have a similar sort of search that I use in a dashboard of my own. The data you have looks fairly simple in structure and so you could index the data, ensuring the fields are correctly extracted and then use a search something like the following:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=&amp;lt;your_index&amp;gt;  
| kmeans k=&amp;lt;how_many_clusters&amp;gt; dt=&amp;lt;your_distype&amp;gt; &amp;lt;numeric_field_1&amp;gt; &amp;lt;numeric_field_2&amp;gt; cfield="Cluster number"
| stats mode(&amp;lt;field1&amp;gt;) mode(&amp;lt;field2&amp;gt;) by "Cluster number"
| rename mode(&amp;lt;field1&amp;gt;) AS "&amp;lt;Better Name&amp;gt;" mode(&amp;lt;field2&amp;gt;) AS "&amp;lt;Better Name&amp;gt;"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The search above is one I use to cluster patterns in airline traffic, grouping them by heading and altitude.&lt;/P&gt;

&lt;P&gt;Hopefully that's enough to get going with - let me know if you have any more questions.&lt;/P&gt;

&lt;P&gt;Regards,&lt;/P&gt;

&lt;P&gt;Martyn&lt;/P&gt;</description>
      <pubDate>Mon, 03 Jun 2019 18:56:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Deployment-Architecture/How-to-make-a-loop-including-a-dataframe-for-each-jobname/m-p/402273#M14519</guid>
      <dc:creator>martynoconnor</dc:creator>
      <dc:date>2019-06-03T18:56:14Z</dc:date>
    </item>
    <item>
      <title>Re: How to make a loop including a dataframe for each jobname</title>
      <link>https://community.splunk.com/t5/Deployment-Architecture/How-to-make-a-loop-including-a-dataframe-for-each-jobname/m-p/402274#M14520</link>
      <description>&lt;P&gt;Hi Martyn, &lt;/P&gt;

&lt;P&gt;I need to cluster my dataset in 4 groups: those who have outliers early in the month, 15th, 21th and last day of the month by the jobname, and I have to use the avg, date and one other numerical column.&lt;BR /&gt;
So I can analyze each jobname already knowing their pattern. I'm trying to separate each jobname with their information and then start to figure how to cluster them. If you have some idea, please share with me.&lt;/P&gt;

&lt;P&gt;Regards,&lt;/P&gt;

&lt;P&gt;Nick&lt;/P&gt;</description>
      <pubDate>Tue, 04 Jun 2019 13:19:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Deployment-Architecture/How-to-make-a-loop-including-a-dataframe-for-each-jobname/m-p/402274#M14520</guid>
      <dc:creator>nsantiago17</dc:creator>
      <dc:date>2019-06-04T13:19:04Z</dc:date>
    </item>
    <item>
      <title>Re: How to make a loop including a dataframe for each jobname</title>
      <link>https://community.splunk.com/t5/Deployment-Architecture/How-to-make-a-loop-including-a-dataframe-for-each-jobname/m-p/402275#M14521</link>
      <description>&lt;P&gt;Hi @nsantiago17  ,&lt;/P&gt;

&lt;P&gt;Did you have a chance to check out an answer? If it worked, please resolve this post by approving it! If your problem is still not solved, keep us updated so that someone else can help you. &lt;/P&gt;

&lt;P&gt;Thanks for posting!&lt;/P&gt;</description>
      <pubDate>Fri, 07 Jun 2019 15:44:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Deployment-Architecture/How-to-make-a-loop-including-a-dataframe-for-each-jobname/m-p/402275#M14521</guid>
      <dc:creator>evania</dc:creator>
      <dc:date>2019-06-07T15:44:29Z</dc:date>
    </item>
    <item>
      <title>Re: How to make a loop including a dataframe for each jobname</title>
      <link>https://community.splunk.com/t5/Deployment-Architecture/How-to-make-a-loop-including-a-dataframe-for-each-jobname/m-p/402276#M14522</link>
      <description>&lt;P&gt;Hi, I replied Martyn but he didn't answer anymore, so I'm still without a solution or something that can help me to solve the question.&lt;/P&gt;</description>
      <pubDate>Mon, 24 Jun 2019 17:37:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Deployment-Architecture/How-to-make-a-loop-including-a-dataframe-for-each-jobname/m-p/402276#M14522</guid>
      <dc:creator>nsantiago17</dc:creator>
      <dc:date>2019-06-24T17:37:07Z</dc:date>
    </item>
  </channel>
</rss>

