Register
Login
Resources
Docs Blog Datasets Glossary Case Studies Tutorials & Webinars
Product
Data Engine LLMs Platform Enterprise
Pricing Explore
Connect to our Discord channel

bug.py 595 B

You have to be logged in to leave a comment. Sign In
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
  1. #!/usr/bin/env/python3
  2. from dagshub.data_engine.datasources import get_datasource
  3. from glob import glob
  4. import pandas as pd
  5. if __name__ == '__main__':
  6. ds = get_datasource('jinensetpal/mre', 'data')
  7. data = [x for x in glob('data/**', recursive=True) if x[-4] == '.']
  8. df = pd.DataFrame([{'path': data[0], 'label': data[1], 'datapoint_id': 0}])
  9. ds.upload_metadata_from_dataframe(df, path_column='label')
  10. print(ds.all().dataframe) # error, empty dataframe
  11. ds.upload_metadata_from_dataframe(df, path_column='path')
  12. print(ds.all().dataframe) # populated dataframe
Tip!

Press p or to see the previous file or, n or to see the next file

Comments

Loading...