Skip to content

Commit 8262d59

Browse files
code sample for pandas-dev#39247
1 parent f3cfe4d commit 8262d59

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

bisect/39247.py

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
import codecs
2+
3+
import pandas as pd
4+
5+
print(pd.__version__)
6+
7+
8+
x = [1, 2, 3, 4, 5]
9+
y = [6, 7, 8, 9, 10]
10+
z = ["a", "b", "c", "d", "e"]
11+
data = {"X": x, "Y": y, "Z": z}
12+
df = pd.DataFrame(data, columns=["X", "Y", "Z"])
13+
14+
fp = codecs.open("out-testPD12.csv", "w", "utf-8")
15+
df.to_csv(fp, index=False, header=True)
16+
fp.close()
17+
18+
result = pd.read_csv("out-testPD12.csv")
19+
print(result)

0 commit comments

Comments
 (0)