Skip to content

Commit f808c35

Browse files
committed
w
1 parent 377d33a commit f808c35

16 files changed

Lines changed: 404 additions & 150 deletions

File tree

.DS_Store

2 KB
Binary file not shown.

_freeze/.DS_Store

0 Bytes
Binary file not shown.

_freeze/data manipulation/1 input output/execute-results/html.json

Lines changed: 2 additions & 2 deletions
Large diffs are not rendered by default.

data manipulation/.DS_Store

0 Bytes
Binary file not shown.

data manipulation/1 input output.qmd

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,17 @@ data=pd.read_feather("data/feather_file.feather")
8282
data.head()
8383
```
8484

85+
86+
## txt
87+
88+
```{python}
89+
f = open("txt_example.txt", "r")
90+
a=f.read()
91+
print(a)
92+
```
93+
94+
95+
8596
# outout
8697

8798
## write CSV
@@ -115,6 +126,27 @@ data.head(100).to_parquet('data/df.parquet.gzip',
115126
data.head(100).to_feather("data/feather_file.feather")
116127
```
117128

129+
130+
## write txt
131+
132+
```{python}
133+
a_txt='''
134+
Testing
135+
136+
Testing, Testing.
137+
Testing
138+
'''
139+
140+
print(a_txt)
141+
```
142+
143+
```{python}
144+
f = open("myfile.txt", "w")
145+
f.write(a_txt)
146+
f.close()
147+
```
148+
149+
118150
# Refernce
119151

120152
https://medium.com/@gadhvirushiraj/the-best-file-format-for-data-science-ed756f937be8

data manipulation/4 siuba.qmd

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,15 @@ siuba (小巴) is a port of dplyr and other R libraries with seamless support fo
2525

2626

2727
![](images/2.png){width="656"}
28+
Using python 3.11
29+
30+
```{r}
31+
Sys.setenv(RETICULATE_PYTHON = "/Library/Frameworks/Python.framework/Versions/3.11/bin/python3.11")
32+
library(reticulate)
33+
use_python("/Library/Frameworks/Python.framework/Versions/3.11/bin/python3.11")
34+
```
35+
36+
2837

2938
## load package
3039
```{python}

data manipulation/data/out.xlsx

1 Byte
Binary file not shown.

data manipulation/myfile.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
2+
Testing
3+
4+
Testing, Testing.
5+
Testing

data manipulation/txt_example.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
Testing
2+
3+
Testing, Testing.
4+
Testing

docs/.DS_Store

0 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)