[Tutor] Print statement for dataframes

Dennis Lee Bieber wlfraed at ix.netcom.com
Thu Sep 2 10:44:10 EDT 2021


On Wed, 01 Sep 2021 23:06:59 -0400, Dennis Lee Bieber
<wlfraed at ix.netcom.com> declaimed the following:

>On Thu, 2 Sep 2021 00:35:13 +0800, nzbz xx <nzbzxx at gmail.com> declaimed the
>following:
>
>>Hi,
>>
>>I have the following dataframe. Is there a way to print statement results
>>for every row & column using for loop?
>>
>>              s_0520    s_1080
>>date
>>2018-06-29 -0.061031 -0.000006
>>2018-09-28 -0.000516  0.022360
>
>	What do you expect the output to look like? And, heck, what package are
>you using for that "dataframe"? After all, there are some Python packages
>that interface with R... (or, if you prefer, R packages that interface to
>Python).

	Addendum: is the date column actually considered part of the row
/data/, or is it considered a row label or name? If the latter, you
probably have to use a different attribute to retrieve it. The rest of the
data should be accessible by indexing (check the docs if it is [row, col]
or [col, row]).


-- 
	Wulfraed                 Dennis Lee Bieber         AF6VN
	wlfraed at ix.netcom.com    http://wlfraed.microdiversity.freeddns.org/



More information about the Tutor mailing list