<?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 Numpy array from CASTable gets truncated at 10k entries in Developers</title>
    <link>https://communities.sas.com/t5/Developers/Numpy-array-from-CASTable-gets-truncated-at-10k-entries/m-p/346672#M155</link>
    <description>&lt;P&gt;Hi everybody,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I cannot retrieve the entire values from a CASTable, as they get truncated after 10000 entries when trying to save them as apndas dataframe.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i am working with SAS Viya in Python and was trying to access values in the CASTable in order to save them in a pandas dataframe.&lt;/P&gt;&lt;P&gt;When i print infos concerning the table i get (correctly) 21401 rows in the table&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;CASTable(u'my_table', caslib=u'CASUSER(myusername)')
Data columns (total 6 columns):
                 N   Miss    Type
id           21401  False  double
age          21297   True  double
sex_id       21297   True  double
sire_id      21297   True  double
dam_id       21297   True  double
prize_money  21297   True  double&lt;/PRE&gt;&lt;P&gt;When i try to access the values and print the shape of the values array:&lt;/P&gt;&lt;PRE&gt;my_table.casTable.values.shape

(10000L, 6L)&lt;/PRE&gt;&lt;P&gt;So the array gets truncated after 10000 entries .&lt;BR /&gt;&lt;BR /&gt;How can i address that, and get the full numpy array?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Luca&lt;/P&gt;</description>
    <pubDate>Mon, 03 Apr 2017 13:43:24 GMT</pubDate>
    <dc:creator>lcarcano</dc:creator>
    <dc:date>2017-04-03T13:43:24Z</dc:date>
    <item>
      <title>Numpy array from CASTable gets truncated at 10k entries</title>
      <link>https://communities.sas.com/t5/Developers/Numpy-array-from-CASTable-gets-truncated-at-10k-entries/m-p/346672#M155</link>
      <description>&lt;P&gt;Hi everybody,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I cannot retrieve the entire values from a CASTable, as they get truncated after 10000 entries when trying to save them as apndas dataframe.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i am working with SAS Viya in Python and was trying to access values in the CASTable in order to save them in a pandas dataframe.&lt;/P&gt;&lt;P&gt;When i print infos concerning the table i get (correctly) 21401 rows in the table&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;CASTable(u'my_table', caslib=u'CASUSER(myusername)')
Data columns (total 6 columns):
                 N   Miss    Type
id           21401  False  double
age          21297   True  double
sex_id       21297   True  double
sire_id      21297   True  double
dam_id       21297   True  double
prize_money  21297   True  double&lt;/PRE&gt;&lt;P&gt;When i try to access the values and print the shape of the values array:&lt;/P&gt;&lt;PRE&gt;my_table.casTable.values.shape

(10000L, 6L)&lt;/PRE&gt;&lt;P&gt;So the array gets truncated after 10000 entries .&lt;BR /&gt;&lt;BR /&gt;How can i address that, and get the full numpy array?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Luca&lt;/P&gt;</description>
      <pubDate>Mon, 03 Apr 2017 13:43:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Developers/Numpy-array-from-CASTable-gets-truncated-at-10k-entries/m-p/346672#M155</guid>
      <dc:creator>lcarcano</dc:creator>
      <dc:date>2017-04-03T13:43:24Z</dc:date>
    </item>
    <item>
      <title>Re: Numpy array from CASTable gets truncated at 10k entries</title>
      <link>https://communities.sas.com/t5/Developers/Numpy-array-from-CASTable-gets-truncated-at-10k-entries/m-p/346688#M156</link>
      <description>I know nothing about Viya, but if the CASTable can be converted to a SAS dataset both python and R can read it&lt;BR /&gt;library(haven) in R&lt;BR /&gt;import SAS&amp;amp;BDAT with sas7bdat in Python?</description>
      <pubDate>Mon, 03 Apr 2017 14:50:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Developers/Numpy-array-from-CASTable-gets-truncated-at-10k-entries/m-p/346688#M156</guid>
      <dc:creator>rogerjdeangelis</dc:creator>
      <dc:date>2017-04-03T14:50:14Z</dc:date>
    </item>
    <item>
      <title>Re: Numpy array from CASTable gets truncated at 10k entries</title>
      <link>https://communities.sas.com/t5/Developers/Numpy-array-from-CASTable-gets-truncated-at-10k-entries/m-p/346948#M157</link>
      <description>&lt;P&gt;Thanks, in the end i managed to solve this problem by exporting the CASTable to SASFrame and then converting the SASFrame to Pandas Dataframe&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;import pandas as pd&lt;/P&gt;&lt;P&gt;my_dataframe =&amp;nbsp; pd.DataFrame(my_table.to_frame())&lt;/P&gt;</description>
      <pubDate>Tue, 04 Apr 2017 07:45:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Developers/Numpy-array-from-CASTable-gets-truncated-at-10k-entries/m-p/346948#M157</guid>
      <dc:creator>lcarcano</dc:creator>
      <dc:date>2017-04-04T07:45:07Z</dc:date>
    </item>
    <item>
      <title>Re: Numpy array from CASTable gets truncated at 10k entries</title>
      <link>https://communities.sas.com/t5/Developers/Numpy-array-from-CASTable-gets-truncated-at-10k-entries/m-p/678685#M906</link>
      <description>&lt;P&gt;&lt;SPAN&gt;To convert the Pandas object to DataFrame, use to_frame() method.&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;The to_frame() method is used to convert a Series object into a DataFrame. Series is a one-dimensional array with axis labels, which is also defined under the Pandas library.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;You can&amp;nbsp;export the CASTable to SASFrame and then convert the SASFrame to Pandas Dataframe.&amp;nbsp;&lt;A href="https://appdividend.com/2020/06/18/pandas-dataframe-to_numpy-dataframe-to-numpy-array/" target="_blank" rel="noopener"&gt;Pandas Dataframe.to_numpy()&lt;/A&gt; is an inbuilt method that is used to&amp;nbsp;convert a DataFrame to a numpy array.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 22 Aug 2020 18:03:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Developers/Numpy-array-from-CASTable-gets-truncated-at-10k-entries/m-p/678685#M906</guid>
      <dc:creator>KrunalLathiya</dc:creator>
      <dc:date>2020-08-22T18:03:11Z</dc:date>
    </item>
  </channel>
</rss>

