forked from entrepreneur-interet-general/solidata_backend
-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
more on uploading files / created a new collection to split columns f…
…rom dsi
- Loading branch information
1 parent
c777a83
commit 9ed8a60
Showing
26 changed files
with
690 additions
and
235 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
|
||
from ._choices_files import * | ||
from ._choices_open_level import * | ||
from ._choices_licences import * | ||
from ._choices_user import * | ||
from ._choices_user import * | ||
from._choices_docs import * |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
|
||
# -*- encoding: utf-8 -*- | ||
|
||
""" | ||
_choices_docs.py | ||
- all choices related to documents | ||
""" | ||
# from copy import copy, deepcopy | ||
|
||
from log_config import log, pformat | ||
|
||
log.debug("... loading _choices_docs.py ...") | ||
|
||
|
||
|
||
doc_src_type_list = ["api","xls","xlsx","xml","csv"] | ||
|
||
doc_type_list = ["usr","prj","dmt","dmf","dsi","dsr","rec","dso","tag"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# -*- encoding: utf-8 -*- | ||
|
||
""" | ||
_choices_open_level.py | ||
- all choices related to open data levels | ||
""" | ||
# from copy import copy, deepcopy | ||
|
||
from log_config import log, pformat | ||
|
||
log.debug("... loading _choices_open_level.py ...") | ||
|
||
|
||
open_level_choices = [ | ||
"open_data", | ||
"collective", | ||
"commons", | ||
"private" | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
from .pd_read_files import * |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
# -*- encoding: utf-8 -*- | ||
|
||
""" | ||
pd_read_files.py | ||
""" | ||
|
||
|
||
from log_config import log, pformat | ||
|
||
log.debug("... loading pd_read_files.py ...") | ||
|
||
|
||
import pandas as pd | ||
|
||
|
||
def read_file_with_pd ( uploaded_file, file_extension ) : | ||
|
||
if file_extension == "csv" : | ||
df = pd.read_csv(uploaded_file) | ||
|
||
elif file_extension in ["xls","xlsx"] : | ||
df = pd.read_excel(uploaded_file) | ||
|
||
elif file_extension == "xml" : | ||
### TO DO !!! | ||
df = pd.read_excel(uploaded_file) | ||
|
||
|
||
|
||
|
||
return df | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.