Skip to content

Commit

Permalink
mv test.{txt,parquet}.dvc into dvc-tracked dir data/
Browse files Browse the repository at this point in the history
  • Loading branch information
ryan-williams committed Dec 26, 2024
1 parent f29e52a commit 3257258
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 15 deletions.
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
/test.txt
/test.parquet
/data
6 changes: 6 additions & 0 deletions data.dvc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
outs:
- md5: 639653e88148f06346d0b965fd0318cc.dir
size: 1612
nfiles: 2
hash: md5
path: data
5 changes: 0 additions & 5 deletions test.parquet.dvc

This file was deleted.

14 changes: 11 additions & 3 deletions test.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,15 @@
from os import makedirs

import pandas as pd

makedirs('data', exist_ok=True)

df = pd.DataFrame({
'num': [111, 222, 333, 444, 555, 666, 777, 888],
'str': ['aaa', 'bbb', 'ccc', 'ddd', 'eee', 'fff', 'ggg', 'hhh'],
'num': [111, 222, 333, 444, 555],
'str': ['aaa', 'bbb', 'ccc', 'ddd', 'eee'],
}).astype({ 'num': 'int32' })
df.to_parquet('test.parquet', index=False)
df.to_parquet('data/test.parquet', index=False)

with open('data/test.txt', 'w') as f:
for i in range(10):
print(f"{i}", file=f)
5 changes: 0 additions & 5 deletions test.txt.dvc

This file was deleted.

0 comments on commit 3257258

Please # to comment.