<?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 Re: Deleting observations by witH same date NBA Data cleaning in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Deleting-observations-by-witH-same-date-NBA-Data-cleaning/m-p/871213#M82648</link>
    <description>&lt;P&gt;Could you please provide us with the sample data and explain with any example where the values are doubling up?&lt;/P&gt;</description>
    <pubDate>Fri, 21 Apr 2023 17:42:58 GMT</pubDate>
    <dc:creator>vijaypratap0195</dc:creator>
    <dc:date>2023-04-21T17:42:58Z</dc:date>
    <item>
      <title>Deleting observations by witH same date NBA Data cleaning</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Deleting-observations-by-witH-same-date-NBA-Data-cleaning/m-p/863067#M82583</link>
      <description>&lt;P&gt;I have game stats from the 2018-2019 NBA season but some data values are double counted with the team names switching variables. This is what the data looks like. Not all observations have this issue this is just what It looks like at certain points in the data&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV class=""&gt;&lt;DIV align="center"&gt;&lt;DIV class=""&gt;&lt;DIV align="center"&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV class=""&gt;&lt;DIV align="center"&gt;&lt;DIV class=""&gt;&lt;DIV align="center"&gt;&lt;TABLE cellspacing="0" cellpadding="5"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;22&lt;/TD&gt;&lt;TD&gt;UTA&lt;/TD&gt;&lt;TD&gt;10/22/2018&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;MEM&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;23&lt;/TD&gt;&lt;TD&gt;OKC&lt;/TD&gt;&lt;TD&gt;10/22/2018&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;GSW&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;24&lt;/TD&gt;&lt;TD&gt;MEM&lt;/TD&gt;&lt;TD&gt;10/22/2018&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;UTA&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;25&lt;/TD&gt;&lt;TD&gt;GSW&lt;/TD&gt;&lt;TD&gt;10/22/2018&lt;/TD&gt;&lt;TD&gt;UTA&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 08 Mar 2023 20:16:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Deleting-observations-by-witH-same-date-NBA-Data-cleaning/m-p/863067#M82583</guid>
      <dc:creator>Conleyw18</dc:creator>
      <dc:date>2023-03-08T20:16:37Z</dc:date>
    </item>
    <item>
      <title>Re: Deleting observations by witH same date NBA Data cleaning</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Deleting-observations-by-witH-same-date-NBA-Data-cleaning/m-p/863077#M82584</link>
      <description>&lt;P&gt;If this were my data I would be tempted to place the team names in order and then sort the data, removing duplicates:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Something like:&lt;/P&gt;
&lt;PRE&gt;data have;
   input num teama $ date :mmddyy10. teamb $;
   format date mmddyy10.;
datalines;
22	UTA	10/22/2018	MEM
23	OKC	10/22/2018	GSW
24	MEM	10/22/2018	UTA
25	GSW	10/22/2018	UTA
;

data need;
   set have;
   array t(*) teama teamb;
   call sortc(of t(*));
run;

proc sort data=need out=want nodupkey;
   by date teama teamb;
run;&lt;/PRE&gt;
&lt;P&gt;You should provide example data in form of a data step as above. That way we do not have to guess variable names or properties.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If the ORDER of the team names is important, such as winner / loser then you would need to add additional information in the NEED data step to capture that information into a new variable.&lt;/P&gt;</description>
      <pubDate>Wed, 08 Mar 2023 21:50:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Deleting-observations-by-witH-same-date-NBA-Data-cleaning/m-p/863077#M82584</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2023-03-08T21:50:52Z</dc:date>
    </item>
    <item>
      <title>Re: Deleting observations by witH same date NBA Data cleaning</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Deleting-observations-by-witH-same-date-NBA-Data-cleaning/m-p/871213#M82648</link>
      <description>&lt;P&gt;Could you please provide us with the sample data and explain with any example where the values are doubling up?&lt;/P&gt;</description>
      <pubDate>Fri, 21 Apr 2023 17:42:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Deleting-observations-by-witH-same-date-NBA-Data-cleaning/m-p/871213#M82648</guid>
      <dc:creator>vijaypratap0195</dc:creator>
      <dc:date>2023-04-21T17:42:58Z</dc:date>
    </item>
  </channel>
</rss>

