Repository: frictionlessdata/frictionless-py

Issue:
Pandas tutorial example code has wrong imports
# Overview

The [Pandas Tutorial](https://framework.frictionlessdata.io/docs/tutorials/formats/pandas-tutorial/) has example code that imports the `Package` class, but only uses `Resource`, which is not imported.

> ```python
> from frictionless import Package
> 
> resource = Resource(df)
> pprint(resource.read_rows())
> ```

Discussion:
augusto-herrmann: Hi @roll,

what is this "project" workflow and why does it fail?

Patch:
diff --git a/docs/tutorials/formats/pandas-tutorial.md b/docs/tutorials/formats/pandas-tutorial.md
index 40eddadd..92491bc7 100644
--- a/docs/tutorials/formats/pandas-tutorial.md
+++ b/docs/tutorials/formats/pandas-tutorial.md
@@ -17,7 +17,7 @@ pip install 'frictionless[pandas]' # for zsh shell
 You can read a Pandas dataframe:
 
 ```python title="Python"
-from frictionless import Package
+from frictionless import Resource
 
 resource = Resource(df)
 pprint(resource.read_rows())
diff --git a/frictionless/types/number.py b/frictionless/types/number.py
index d8db46e5..fc8aef1a 100644
--- a/frictionless/types/number.py
+++ b/frictionless/types/number.py
@@ -54,10 +54,12 @@ class NumberType(Type):
         ):
 
             def processor(cell):
-                cell = cell.replace(self.field.group_char, "")
-                cell = cell.replace(self.field.decimal_char, ".")
                 if self.read_cell_pattern:
                     cell = self.read_cell_pattern.sub("", cell)
+                cell = cell.replace(self.field.group_char, "")
+                if self.field.decimal_char != "." and "." in cell:
+                    return None
+                cell = cell.replace(self.field.decimal_char, ".")
                 return cell
 
             return processor


Test patch:
diff --git a/tests/types/test_number.py b/tests/types/test_number.py
index 8580ca38..1bba07c1 100644
--- a/tests/types/test_number.py
+++ b/tests/types/test_number.py
@@ -86,6 +86,10 @@ from frictionless import Field
         ("default", "$10:000.00", None, {}),
         ("default", "string", None, {}),
         ("default", "", None, {}),
+        # Issue 1005
+        ("default", "1.234", None, {"decimalChar": ","}),
+        ("default", "1.234.", None, {"decimalChar": ",", "bareNumber": False}),
+        ("default", "1234.", Decimal(1234), {"decimalChar": ",", "bareNumber": False}),
     ],
 )
 def test_number_read_cell(format, source, target, options):