Replies: 3 comments 3 replies
-
Just to note that transform(resource, steps=[steps.table_normalize(), steps.table_write(path='table_write.csv')]) also does not output the normalized data. |
Beta Was this translation helpful? Give feedback.
0 replies
-
Thanks! I created an issue to investigate frictionlessdata/frictionless-py#1567 |
Beta Was this translation helpful? Give feedback.
0 replies
-
Hi @roll! Could you expand a little more your thinking into way this should be the behaviour of For me, if the in-memory representation of the data has changed from [['id', 'valid', 'amount', 'memo', 'valid_from', 'valid_to', 'updated_at'],
['1',
'no',
'120',
'some information',
'01/02/1995',
'01/02/1995',
'30/11/1994 09:45:00'],
['2',
'yes',
'R$ 2.000,5',
'NA',
'01/02/2002',
'01/02/2002',
'30/09/2002 10:45:00']] to (after the call to [['id', 'valid', 'amount', 'memo', 'valid_from', 'valid_to', 'updated_at'],
[1,
False,
Decimal('120'),
'some information',
datetime.date(1995, 1, 2),
datetime.date(1995, 2, 1),
datetime.datetime(1994, 11, 30, 9, 45)],
[2,
True,
Decimal('2000.5'),
None,
datetime.date(2002, 1, 2),
datetime.date(2002, 2, 1),
datetime.datetime(2002, 9, 30, 10, 45)]] why would data = resource.read_cells()
import csv
with open('data.csv', 'w') as csvfile:
# creating a csv writer object
csvwriter = csv.writer(csvfile)
csvwriter.writerow(data[0])
csvwriter.writerows(data[1:]) |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm trying to use frictionless transform to standardize data sources that use different representations for the same data (think dates in different formats).
For example, for the csv file described by a proper table schema:
I would like to generate the following csv file:
I can achieve this by exporting the csv with
petl
:but I'm wondering if I shoudn't be able to do the same with
resource.write
which currently generates the following csv file:
Note that
resource.write
did converted themissingValue
fromNA
to a empty char in thememo
field without adjusting the tableschema.Beta Was this translation helpful? Give feedback.
All reactions