-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest_transform.py
52 lines (42 loc) · 1.31 KB
/
test_transform.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
# !/usr/bin/env python
# -*- coding: utf-8 -*-
# This file is part of the PymaciesArg Project
# https://github.com/juniors90/PymaciesArg.
#
# Copyright (c) 2022. Ferreira Juan David
# License: MIT
# Full Text: https://github.com/juniors90/PymaciesArg/blob/main/LICENSE
# =============================================================================
# DOCS
# =============================================================================
"""
PymaciesArg.
An extension that registers all pharmacies in Argentina.
"""
# =============================================================================
# IMPORTS
# =============================================================================
import os
import pandas as pd
from pymacies_arg import Transform
def test_trasform(file_path):
data_path = os.path.join(file_path, "pharmacies.csv")
df = pd.read_csv(data_path)
transform = Transform()
df_trasform = transform.transform(df)
cols = [
"id",
"name",
"adress",
"id_location",
"location",
"id_province",
"province",
"id_department",
"department",
"postal_code",
"webpage",
]
# Get the list of all column names from headers
column_headers = list(df_trasform.columns.values)
assert cols == column_headers