Skip to content

Commit

Permalink
Merge pull request #669 from gisce/improve/61128_filtrar_per_models_i…
Browse files Browse the repository at this point in the history
…gual_I

B9: IMP Filtrar datos por modelo igual a 'I':Inventario)
  • Loading branch information
ecarreras authored Jul 23, 2024
2 parents e63352a + 1b0ec43 commit 48c3a0a
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions libcnmc/cir_8_2021/FB9.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ def consumer(self):
columns = [str(x) for x in range(35)]
df = pd.read_csv(file_path, sep=';', decimal=',', names=columns,
dtype={'0': 'object', '21': 'object', '23': 'object', '34': 'object'})
df = df[df['16'] == 'I']
df['28'] = pd.to_numeric(df['28'], errors='coerce').astype(float)
df['22'] = pd.to_numeric(df['22'], errors='coerce').astype(float)
at = OrderedDict()
Expand Down Expand Up @@ -165,6 +166,7 @@ def consumer(self):
columns = [str(x) for x in range(35)]
df = pd.read_csv(file_path, sep=';', decimal=',', names=columns,
dtype={'0': 'object', '21': 'object', '23': 'object', '34': 'object'})
df = df[df['16'] == 'I']
df['28'] = pd.to_numeric(df['28'], errors='coerce').astype(float)
df['22'] = pd.to_numeric(df['22'], errors='coerce').astype(float)
bt = OrderedDict()
Expand Down Expand Up @@ -243,6 +245,7 @@ def consumer(self):
file_path = '/tmp/8_2021_loaded_or_generated_b4.txt'
columns = [str(x) for x in range(27)]
df = pd.read_csv(file_path, sep=';', decimal=',', names=columns)
df = df[df['8'] == 'I']
df['24'] = pd.to_numeric(df['24'], errors='coerce').astype(float)
df['14'] = pd.to_numeric(df['14'], errors='coerce').astype(float)
pos = OrderedDict()
Expand Down Expand Up @@ -321,6 +324,7 @@ def consumer(self):
file_path = '/tmp/8_2021_loaded_or_generated_b5.txt'
columns = [str(x) for x in range(25)]
df = pd.read_csv(file_path, sep=';', decimal=',', names=columns)
df = df[df['7'] == 'I']
df['21'] = pd.to_numeric(df['21'], errors='coerce').astype(float)
df['12'] = pd.to_numeric(df['12'], errors='coerce').astype(float)
trafo = OrderedDict()
Expand Down Expand Up @@ -395,6 +399,7 @@ def consumer(self):
file_path = '/tmp/8_2021_loaded_or_generated_b6.txt'
columns = [str(x) for x in range(31)]
df = pd.read_csv(file_path, sep=';', decimal=',', names=columns)
df = df[df['17'] == 'I']
df['27'] = pd.to_numeric(df['27'], errors='coerce').astype(float)
df['19'] = pd.to_numeric(df['19'], errors='coerce').astype(float)
cel = OrderedDict()
Expand Down Expand Up @@ -470,6 +475,7 @@ def consumer(self):
file_path = '/tmp/8_2021_loaded_or_generated_b2.txt'
columns = [str(x) for x in range(36)]
df = pd.read_csv(file_path, sep=';', decimal=',', names=columns)
df = df[df['17'] == 'I']
df['31'] = pd.to_numeric(df['31'], errors='coerce').astype(float)
df['23'] = pd.to_numeric(df['23'], errors='coerce').astype(float)
df['8'] = pd.to_numeric(df['8'], errors='coerce').astype(float)
Expand Down

0 comments on commit 48c3a0a

Please sign in to comment.