In R if someone on SO posts a data frame as text: x y 1 1 a 2 2 b 3 3 c One would highlight and copy the data frame as is, and paste it into R to recreate it: df <- read.tab
Solution 1:
As @EdChurn suggested in the comments, the task is very simple and straightforward with pandas:
Copy the data from the original source with Ctrl+C (or other method)
In Python:
import pandas as pd
df = pd.read_clipboard()
>>> df
x y
11 a
22 b
33 c
Share
Post a Comment
for "Python Translation Of R's Read.table 'text' Argument"
Post a Comment for "Python Translation Of R's Read.table 'text' Argument"