<?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: How to export table with more than 1,048,576 rows of data in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/how-to-export-table-with-more-than-1-048-576-rows/m-p/641618#M50007</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You don't need pandas, and a cleaner check to ensure Unicode support etc is to use numpy.&lt;/P&gt;&lt;P&gt;I built this little function which I use instead of the standard versions that ship natively&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="keyword token"&gt;def&lt;/SPAN&gt; &lt;SPAN class="token function"&gt;save_txt&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;a&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; name&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"arr.txt"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; sep&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;", "&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; dt_hdr&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;&lt;SPAN class="token boolean"&gt;True&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
    &lt;SPAN class="string token"&gt;"""Save a NumPy structured, recarray to text.

    Parameters
    ----------
    a : array
        input array
    fname : filename
        output filename and path otherwise save to script folder
    sep : separator
        column separater, include a space if needed
    dt_hdr : boolean
        if True, add dtype names to the header of the file

    """&lt;/SPAN&gt;
    a_names &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;", "&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;join&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;i &lt;SPAN class="keyword token"&gt;for&lt;/SPAN&gt; i &lt;SPAN class="keyword token"&gt;in&lt;/SPAN&gt; a&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;dtype&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;names&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
    hdr &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;""&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; a_names&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;dt_hdr&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;  &lt;SPAN class="comment token"&gt;# use "" or names from input array&lt;/SPAN&gt;
    s &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; np&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;array&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;a&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;tolist&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; dtype&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;np&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;unicode_&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
    widths &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;max&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;len&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;i&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;for&lt;/SPAN&gt; i &lt;SPAN class="keyword token"&gt;in&lt;/SPAN&gt; s&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; j&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
              &lt;SPAN class="keyword token"&gt;for&lt;/SPAN&gt; j &lt;SPAN class="keyword token"&gt;in&lt;/SPAN&gt; range&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;s&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;shape&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;1&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;
    frmt &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; sep&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;join&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"%{}s"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;format&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;i&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;for&lt;/SPAN&gt; i &lt;SPAN class="keyword token"&gt;in&lt;/SPAN&gt; widths&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
    &lt;SPAN class="comment token"&gt;# vals = ", ".join([i[1] for i in a.dtype.descr])&lt;/SPAN&gt;
    np&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;savetxt&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;name&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; a&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; fmt&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;frmt&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; header&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;hdr&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; comments&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;""&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
    &lt;SPAN class="keyword token"&gt;print&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"\nFile saved..."&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;since you already have your array, you can use the above with any separator you want, not just comma-delimited.&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;save_txt&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;ar&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"c:/temp/arr.txt"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; sep&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;", "&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; dt_hdr&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;&lt;SPAN class="token boolean"&gt;True&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 12 Dec 2021 03:16:09 GMT</pubDate>
    <dc:creator>DanPatterson_Retired</dc:creator>
    <dc:date>2021-12-12T03:16:09Z</dc:date>
    <item>
      <title>How to export table with more than 1,048,576 rows of data</title>
      <link>https://community.esri.com/t5/python-questions/how-to-export-table-with-more-than-1-048-576-rows/m-p/641614#M50003</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello all,&lt;/P&gt;&lt;P&gt;I have a data table with more than 1,048,576 rows of data which is the limit of microsoft and hence cannot use the Table to Excel function.&amp;nbsp; I tried to export to txt file and then open in excel but still no luck. Is there an alternative that you have used to deal with these larger tables? There are about 10 million rows total. I am not opposed to working in python.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Jun 2019 18:31:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-to-export-table-with-more-than-1-048-576-rows/m-p/641614#M50003</guid>
      <dc:creator>BaileyFredlund1</dc:creator>
      <dc:date>2019-06-20T18:31:03Z</dc:date>
    </item>
    <item>
      <title>Re: How to export table with more than 1,048,576 rows of data</title>
      <link>https://community.esri.com/t5/python-questions/how-to-export-table-with-more-than-1-048-576-rows/m-p/641615#M50004</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I export them as logical blocks; export a given Zipcode, County, State, Watershed etc...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Jun 2019 18:37:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-to-export-table-with-more-than-1-048-576-rows/m-p/641615#M50004</guid>
      <dc:creator>DEWright_CA</dc:creator>
      <dc:date>2019-06-20T18:37:30Z</dc:date>
    </item>
    <item>
      <title>Re: How to export table with more than 1,048,576 rows of data</title>
      <link>https://community.esri.com/t5/python-questions/how-to-export-table-with-more-than-1-048-576-rows/m-p/641616#M50005</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What is it you want to do that you need excel?&lt;/P&gt;&lt;P&gt;Perhaps the functionality can be implemented through tools/scripts with the Arc* environment&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Jun 2019 00:05:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-to-export-table-with-more-than-1-048-576-rows/m-p/641616#M50005</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2019-06-21T00:05:44Z</dc:date>
    </item>
    <item>
      <title>Re: How to export table with more than 1,048,576 rows of data</title>
      <link>https://community.esri.com/t5/python-questions/how-to-export-table-with-more-than-1-048-576-rows/m-p/641617#M50006</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Pandas might be for you.&lt;/P&gt;&lt;P&gt;&lt;A href="https://pandas.pydata.org/" rel="nofollow noopener noreferrer" target="_blank"&gt;https://pandas.pydata.org/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://geospatialtraining.com/tutorial-creating-a-pandas-dataframe-from-a-shapefile/" rel="nofollow noopener noreferrer" target="_blank"&gt;http://geospatialtraining.com/tutorial-creating-a-pandas-dataframe-from-a-shapefile/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://datatofish.com/export-dataframe-to-csv/" style="color: #2989c5; text-decoration: none;" rel="nofollow noopener noreferrer" target="_blank"&gt;https://datatofish.com/export-dataframe-to-csv/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://towardsdatascience.com/why-and-how-to-use-pandas-with-large-data-9594dda2ea4c" rel="nofollow noopener noreferrer" target="_blank"&gt;https://towardsdatascience.com/why-and-how-to-use-pandas-with-large-data-9594dda2ea4c&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I only have a ~140,000 rows to work within my test... but I think you could scale stuff up.&lt;/P&gt;&lt;P&gt;&lt;A href="https://stackoverflow.com/questions/14525344/whats-the-maximum-size-of-a-numpy-array" rel="nofollow noopener noreferrer" target="_blank"&gt;https://stackoverflow.com/questions/14525344/whats-the-maximum-size-of-a-numpy-array&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;SPAN style="color: #cc7832;"&gt;import &lt;/SPAN&gt;pandas
&lt;SPAN style="color: #cc7832;"&gt;import &lt;/SPAN&gt;arcpy

arcpy.env.workspace = connection

source = &lt;SPAN style="color: #a5c261;"&gt;'coninfo'
&lt;/SPAN&gt;field_names = arcpy.ListFields(source)
field_names = [x.name &lt;SPAN style="color: #cc7832;"&gt;for &lt;/SPAN&gt;x &lt;SPAN style="color: #cc7832;"&gt;in &lt;/SPAN&gt;field_names]
field_names = field_names[:&lt;SPAN style="color: #6897bb;"&gt;1&lt;/SPAN&gt;]

ar = arcpy.da.TableToNumPyArray(source&lt;SPAN style="color: #cc7832;"&gt;, &lt;/SPAN&gt;field_names)
df = pandas.DataFrame(ar)
df.to_csv(&lt;SPAN style="color: #a5c261;"&gt;'test.csv'&lt;/SPAN&gt;)

&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 03:16:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-to-export-table-with-more-than-1-048-576-rows/m-p/641617#M50006</guid>
      <dc:creator>forestknutsen1</dc:creator>
      <dc:date>2021-12-12T03:16:06Z</dc:date>
    </item>
    <item>
      <title>Re: How to export table with more than 1,048,576 rows of data</title>
      <link>https://community.esri.com/t5/python-questions/how-to-export-table-with-more-than-1-048-576-rows/m-p/641618#M50007</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You don't need pandas, and a cleaner check to ensure Unicode support etc is to use numpy.&lt;/P&gt;&lt;P&gt;I built this little function which I use instead of the standard versions that ship natively&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="keyword token"&gt;def&lt;/SPAN&gt; &lt;SPAN class="token function"&gt;save_txt&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;a&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; name&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"arr.txt"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; sep&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;", "&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; dt_hdr&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;&lt;SPAN class="token boolean"&gt;True&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
    &lt;SPAN class="string token"&gt;"""Save a NumPy structured, recarray to text.

    Parameters
    ----------
    a : array
        input array
    fname : filename
        output filename and path otherwise save to script folder
    sep : separator
        column separater, include a space if needed
    dt_hdr : boolean
        if True, add dtype names to the header of the file

    """&lt;/SPAN&gt;
    a_names &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;", "&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;join&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;i &lt;SPAN class="keyword token"&gt;for&lt;/SPAN&gt; i &lt;SPAN class="keyword token"&gt;in&lt;/SPAN&gt; a&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;dtype&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;names&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
    hdr &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;""&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; a_names&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;dt_hdr&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;  &lt;SPAN class="comment token"&gt;# use "" or names from input array&lt;/SPAN&gt;
    s &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; np&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;array&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;a&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;tolist&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; dtype&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;np&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;unicode_&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
    widths &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;max&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;len&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;i&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;for&lt;/SPAN&gt; i &lt;SPAN class="keyword token"&gt;in&lt;/SPAN&gt; s&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; j&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
              &lt;SPAN class="keyword token"&gt;for&lt;/SPAN&gt; j &lt;SPAN class="keyword token"&gt;in&lt;/SPAN&gt; range&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;s&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;shape&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;1&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;
    frmt &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; sep&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;join&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"%{}s"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;format&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;i&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;for&lt;/SPAN&gt; i &lt;SPAN class="keyword token"&gt;in&lt;/SPAN&gt; widths&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
    &lt;SPAN class="comment token"&gt;# vals = ", ".join([i[1] for i in a.dtype.descr])&lt;/SPAN&gt;
    np&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;savetxt&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;name&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; a&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; fmt&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;frmt&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; header&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;hdr&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; comments&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;""&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
    &lt;SPAN class="keyword token"&gt;print&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"\nFile saved..."&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;since you already have your array, you can use the above with any separator you want, not just comma-delimited.&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;save_txt&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;ar&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"c:/temp/arr.txt"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; sep&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;", "&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; dt_hdr&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;&lt;SPAN class="token boolean"&gt;True&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 03:16:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-to-export-table-with-more-than-1-048-576-rows/m-p/641618#M50007</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2021-12-12T03:16:09Z</dc:date>
    </item>
    <item>
      <title>Re: How to export table with more than 1,048,576 rows of data</title>
      <link>https://community.esri.com/t5/python-questions/how-to-export-table-with-more-than-1-048-576-rows/m-p/641619#M50008</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am not sure what you are trying to achieve. As you noted yourself, and is also documented here:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://support.office.com/en-us/article/excel-specifications-and-limits-1672b34d-7043-467e-8e27-269d656771c3#ID0EBABAAA=Newer_versions"&gt;https://support.office.com/en-us/article/excel-specifications-and-limits-1672b34d-7043-467e-8e27-269d656771c3#ID0EBABAAA=Newer_versions&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Excel can only handle 1M rows maximum. There is no way you will be getting past that limit by changing your import practices, it is after all the limit of the worksheet itself.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For this amount of rows and data, you really should be looking at Microsoft Access. Databases can handle a far greater number of records. Access has basic functionality for summarizing and analyzing data too, so doing some calculations you would like to do in Excel, is likely possible in Access as well, although the process to get there will be different (defining SQL queries instead of defining formulas in Excel).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Jun 2019 07:54:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-to-export-table-with-more-than-1-048-576-rows/m-p/641619#M50008</guid>
      <dc:creator>MarcoBoeringa</dc:creator>
      <dc:date>2019-06-21T07:54:33Z</dc:date>
    </item>
    <item>
      <title>Re: How to export table with more than 1,048,576 rows of data</title>
      <link>https://community.esri.com/t5/python-questions/how-to-export-table-with-more-than-1-048-576-rows/m-p/641620#M50009</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the replies. I ended up just copying the maximum amount of rows in the attribute table and pasting them into excel manually. Was time consuming but the python suggested was a bit too advanced for me! Thanks for yalls help!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 22 Jun 2019 21:36:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-to-export-table-with-more-than-1-048-576-rows/m-p/641620#M50009</guid>
      <dc:creator>BaileyFredlund1</dc:creator>
      <dc:date>2019-06-22T21:36:32Z</dc:date>
    </item>
    <item>
      <title>Re: How to export table with more than 1,048,576 rows of data</title>
      <link>https://community.esri.com/t5/python-questions/how-to-export-table-with-more-than-1-048-576-rows/m-p/1174875#M64570</link>
      <description>&lt;P&gt;For anyone else here who was using the Table to Excel tool as a means to get to .csv, but hitting this record limit (me), you can follow &lt;A href="https://support.esri.com/en/technical-article/000021825" target="_self"&gt;instructions here&lt;/A&gt; for exporting straight to .csv. This should bypass the row limit if .csv is acceptable for your needs.&lt;/P&gt;</description>
      <pubDate>Tue, 17 May 2022 22:46:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-to-export-table-with-more-than-1-048-576-rows/m-p/1174875#M64570</guid>
      <dc:creator>BrittanyBurson</dc:creator>
      <dc:date>2022-05-17T22:46:48Z</dc:date>
    </item>
  </channel>
</rss>

